I want to display a message in php ($mymessage) after a successful paypal payement.
For example:
- A client want buy my product on http://www.mysite.com/product where there is a “pay with paypal” button.
- The client pay on paypal’s website.
- The client is redirected on http://www.mysite.com/product where a new message appear (
$mymessage).
I know it’s possible to check with javascript if the payment is done and refresh automatically the page displaying the message.
Someone can show me the way? (link, ideas or script)
Any help is welcome!
You can do this by return url in paypal. In return url page you have to check the status of payment. if it succeed means you can store message in session and show it to user. after showing the message unset the session variable used for message. This is simple way to show the message.
I dont know what you are trying? i mention the shortest way for your question
Sample code to check the status in return url
in $st , check the status.