Howdy,
I want to learn implementing PayPal in website. I'll be using ExpressCheckout method.
I know there are following steps:
1. Cart page on a website
1a. Provide custom IPN URL in PayPal form (notify_url).
2. Redirect to PayPal payment page.
3a. On success redirect to my "payment confirmation" page.
3b. On false redirect to payment cancelled page.
4. Enable IPN in PayPal account.
5. Prepare payment handler page. PayPal response will be sent to this page.
Everything above has been tested and it's working perfectly.
Anyway, I have few questions.
Let's say I want to log in transactions in database, only for registered members. So:
On cart checkout page I'm creating a query adding transaction into database table. I'm inserting amount, user ID, date, etc.
Now I'm wondering about one thing. Basically I know how to handle PayPal response but I have totally no idea how to add temporary transaction id to the PayPal form.
I'm testing payments in sandbox. When payment is done, it returns to provided URL with following $_GET data: ?token=EC-8JP09047FK347153S&PayerID=C9UCCD3968V52
.
- How to dynamically add token and Payer_ID to PayPal form?
- Does IPN response return same data? Then I'll be able to insert transaction ID in database and set it as token.
- Is tokes a kind of transaction ID?
Any help will be appreciated.
Cheers, Mike Turner