So I think you have completed the shopping cart well.
Now buyer is ready to redirect back to merchant web site.
On this level onwards, You can use.
- PDT (Payment Data Transfer)
- IPN (Instant Payment Notification)
After paying on paypal side there is a button to redirect back to the Merchant web site. This is PDT. you can specify a
return url for this with return method as GET or POST (element name is
rm). I think you are familiar with these.
say your return url
http://yourdomain.com/thanks.php
Based on the return method you specified can display the Transaction Info on that page.
please read here. to find out more info and code samples.
at this page level you can do the database updating for buyer. something like payments status can update with
PAID .
but Dont do that. Because some buyers will close the page after COMPLETING the payments to your paypal account. So payment status is paid but no way to update it. because he did not click the return to merchant web site button. so PDT'll fail to do the updation.
So please use the IPN for this type of things. IPN is basically totally hidden process to the buyer. On success full transaction paypal IPN server sends a request to the
notify_url that you specified in your cart form. So its a server to server communication. for more read
here.
So let your IPN script to update your database. not to the PDT script.
paypal by it name itself a PAL. read the mannuals.what you need its already there at Paypal level.
Post back any time with any paypal issue :)
Thanks!
-ajaxrand