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)?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With