esoteric Posted March 6, 2012 Share Posted March 6, 2012 Hi, I have setup my paypal payment method for a shopping cart on my site, all is well but in order for my server to flag an invoice as paid, the user must return to my website after paying and the query string in the url give the script the go ahead to mark it as paid which in turn alerts the appropriate department that its ok to source the order. ~The problem is, if the user for whatever reason skip the redirect back to my site, the invoice is remain 'unpaid' and has to be changed manually when the payment has been checked in the account. As you might imagine this is a bit of a problem because not only can it cause quite a delay, it also requires manually changing values which can lead to other problems. So if there is a better way i would appreciate the info, thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/258405-paypal-return-url/ Share on other sites More sharing options...
noXstyle Posted March 6, 2012 Share Posted March 6, 2012 I'm guessing that Paypal IPN is the thing you're looking for. The way it works is that paypal sends the payment status to your ipn listener rather than via user session params. You can find premade php classes to do the actual heavy lifting for you, like the one hosted in google code. Quote Link to comment https://forums.phpfreaks.com/topic/258405-paypal-return-url/#findComment-1324579 Share on other sites More sharing options...
dannyb785 Posted March 6, 2012 Share Posted March 6, 2012 Hi, I have setup my paypal payment method for a shopping cart on my site, all is well but in order for my server to flag an invoice as paid, the user must return to my website after paying and the query string in the url give the script the go ahead to mark it as paid which in turn alerts the appropriate department that its ok to source the order. ~The problem is, if the user for whatever reason skip the redirect back to my site, the invoice is remain 'unpaid' and has to be changed manually when the payment has been checked in the account. As you might imagine this is a bit of a problem because not only can it cause quite a delay, it also requires manually changing values which can lead to other problems. So if there is a better way i would appreciate the info, thanks a lot. That's why you have the "notify_url" variable in paypal. You can either specify it in the form itself or in your paypal settings. That file you set as your notify_url should be the php page that does all the processing. Plus paypal passes all the payment details(name, address, price paid, etc) through to the notify_url as $_POST variables which makes it easy to process. the return_url is just offered as a link after payment and they can choose to not click it Quote Link to comment https://forums.phpfreaks.com/topic/258405-paypal-return-url/#findComment-1324582 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.