0
votes

I'm working to a new store on my website. I'd like use Paypal IPN so my store can process the order automatically.

I use sandbox to make same test of my code however I have some problem (I think). When a user click on buy button of my store he is redirected to paypal website (in this case sandbox page). Then the user make the payment (click on "buy now") and PayPal show a page with a payment overview, in this page there is also a link to return to my store webpage.

From my tests I understand that only when the user click on this link to return to my store the IPN is call. In alternative IPN is not call even if the payment is completed. In fact if I don't click the retutn link the order is not processed from my store but if I click on it all works.

I'd like get payment information between IPN after the real payment also if the user don't click the return link.

Is this possible? How?

Note: on my store I use HTML forms and get paid through PayPal.

1

1 Answers

1
votes

Sounds like you're confusing Instant Payment Notification (IPN) and Payment Data Transfer (PDT).

They are very similar in that PayPal's server will POST data to a URL that you specify, but IPN will be triggered regardless of whether the user makes it back to your site. PayPal's server will send the data to your IPN URL immediately upon any transaction taking place. IPN is not anything that a user would ever see on screen, and it wouldn't be happening within a browser at all.

PDT is meant to return data to your return URL / thank you page so that you can display it on that page. This happens within the browser and does rely on the user clicking that link or being auto-returned to your return URL specified. This is NOT recommended for things like database updates, email notifications, etc. because even with Auto-Return enabled there is no guarantee the user will make it there and then your code would not run for that order.

Sounds like what you're after is indeed IPN, but you're just setting your IPN URL to the same thing as your return URL, which is NOT the correct way to set it up.

Again, IPN is a stand-alone script that will never be run in the browser.