简体   繁体   中英

paypal redirect user after payment in cakephp

I am using paypalipn plugin for payment on my site. My site developed in cackphp. PayPal Payment is working fine but problem is user not redirect to my site back.

After some investigation I have updated notify URL in my sandbox account and auto redirect on but no success.

When user successfully made payment on PayPal site it should redirect back to my site but it shows next screen with two buttons.

1) PayPal account review 
2) return to store

-> When user clicks on PayPal account review button my order status is not changes because user does not redirect back to my site.
-> When user clicks on return to store than order status shows completed.

Any help on this? PayPal does not display two button and redirect back to my site.

It shows following Warning when user clicks on return to store. 在此处输入图片说明

This is happening because Paypal is secure (well, in some ways at least) and uses https, whereas your server is probably using http.

To get rid of the annoying warning, it might help to tell Paypal to return to your website using GET instead of POST and send less of the important data back. Just set the rm (return method) parameter to 1 when you send the request to Paypal, as detailed in the documentation :

Allowable values are:

0 – all shopping cart payments use the GET method

1 – the buyer's browser is redirected to the return URL by using the GET method, but no payment variables are included

2 – the buyer's browser is redirected to the return URL by using the POST method, and all payment variables are included The default is 0.

Note: The rm variable takes effect only if the return variable is set.

Note that the notify_url parameter is different to the return parameter. The former is what the data gets sent to in the background to process the payments, and the latter is simply where the user gets redirected to once the payment processing is complete.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM