views:

95

answers:

1

I assume the answer to this is in the PayPal documentation somewhere, but I've been reading it for two days and my eyes are beginning to whirl.

For Website Payments Standard, I create a page on my site (let's call this page A) which contains a dynamically generated form which contains a bunch of hidden fields detailing the content of the cart, prices of each item included, etc. It also has a token to identify the seller id. And one visible form element: the submit image.

The customer clicks the image, which submits the form to PayPal. PayPal do their thing (which includes posting some data back to us at a URL we define (let's call this page B)), and then returns the customer back to us (again at a URL we define (let's call this page C)).

What I'm looking for is some sort of transaction ID. We have hits from the user on pages A and C, and a hit from PayPal on page B. How do we know these three hits apply to the same transaction? (The hit on page C may not happen, of course.)


In a separate question, am I the only one who thinks PayPal documentation is confusingly written?

A: 

A bit more reading suggests a possible answer.

We can already identify A and C as the same user using the session id. And, on A, we can set a form field called custom containing any information we like. This will be posted back, unchanged, by PayPal to page B. This can be used to identify the user. I'll play with that and see can I get it to work.

TRiG