user3514052
user3514052

Reputation: 429

paypal buy button return page link

I use the paypal button. After payment user see the page with message about success paypament. There is also link to return back to site with my script success.php which writes to mysql inforamtion about order. All working good, but how to prevent situation if user dont press the return link. In that case the order will not be counted.

Upvotes: 0

Views: 62

Answers (2)

PP_MTS_Steven
PP_MTS_Steven

Reputation: 361

If you want to update your database about completed transactions, PayPal Instant Payment Notification (IPN) is available for you to use. Even if your customers do not press the return link. Link below is the details for your reference.

https://developer.paypal.com/docs/classic/products/instant-payment-notification/

But if your issue is relevant to the redirection issue after your customers finish the payment, say, redirect your customers to your set page after they finish the payment, it is PayPal Auto Return feature. Link below is the details for your reference.

https://www.paypal.com/az/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside

Upvotes: 2

Harshal Bulsara
Harshal Bulsara

Reputation: 8264

I would recommend that don't put your processing code in return link, put it in IPN link.

Instance payment Notification will be sent by PayPal regarding the payment information (a POST array), You can retrieve this information and process it as per your need.

In the return link, you can probably put simple information which shows thank you for purchase and will notify you soon.

Upvotes: 0

Related Questions