Simple Checkout with DB-interaction(PHP) via Redirect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I´d like to use the simple integration of a Checkout button, as described here:
https://developer.paypal.com/docs/checkout/integrate/#2-set-up-a-payment
Nevertheless, I´d also like to store the information, that the user has paid, in the background (in a Database via PHP) and then quickly redirect to a confirmation page.
So the sequence I have in mind, goes like that:
(1) Paypal-Button with redirect from within the Paypal-JS-Code (as described here: https://developer.paypal.com/docs/checkout/how-to/customize-flow/#do-a-full-page-redirect )
(2) this (redirect)-page does the background DB action and again redirects to a confirmation page
(3) confirmation page shown to the user
The problem is, that - as far as I know - redirects only work with HTTP-GET, so the second page (2) has to be a public url, which can be accessed directly (triggering the DB action).
Can I somehow verify if the second page is called as a redirect from Paypal (and block all other requests)?
Or is there generally a better solution to this scenario (while ideally still working with the simple checkout option)?
Thanks a lot for your answers!
Best regards,
Daniel

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Is it possible to make payments in RON (Romanian Leu) through PayPal? in REST APIs
- Payments Refunded Automatically After Successful Transactions - PayPal Business Account Issue in REST APIs
- p is not a function error using the example downloaded from Paypal in SDKs
- Advance checkout in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)
- How to enable on-demand / recurring payments to existing PayPal checkout? in SDKs