Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paypal "Buy now" button - how to know that payment was successful

Tags:

java

paypal

I am trying to add "Buy now" button to my Java web application. When generating the button in Paypal, there's option to add URL of success page and cancel page. For example, success URL could be http://www.example.com/success

But how to check that the payment was successful and the user was redirected from Paypal (not entered the success URL manually)?

like image 678
justasd Avatar asked Dec 05 '25 10:12

justasd


1 Answers

Try looking into PayPal's Payment Data Transfer API: https://developer.paypal.com/webapps/developer/docs/classic/products/payment-data-transfer/

Looks like this will give you the data you need to ensure a successful transaction before displaying a product link or purchase info.

like image 109
Alex Avatar answered Dec 08 '25 01:12

Alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!