views:

191

answers:

2

Ive been using express checkout API to convert people's accounts on my site to premium accounts after paying. The only problem with it is that it doesn't send the user back to the site until they click the button to return, and it updates their permission when that happens. About 40% of the users don't seem to do that.... so their accounts never get credited after payment.

Although paypal does an instant post-back upon the successful payment, I was never able to make it actually update the user's account right away, since I cant get it to send back some sort of informational that would identify the user that just completed the payment. I could only do that when you are sent back to the site, which sends the transaction ID, that I logged with a post-back. It searches for it, and grants permission if it was found int he DB.

Is there a way to submit some sort of a variable to paypal, that it will then post back to me? Something like &user_id=123, which would make it very handly to update the user's permission.

+2  A: 
T.J. Crowder
Is there a code example of this? How do I pass the item # to it?
Yegor
@Yegor: Updated with a bit more information. I'm not a PayPal integration expert by *any* means, but hopefully that's useful.
T.J. Crowder
Where would I put that variable? Does it go in a hidden field? My buttons ahve no variables in them, its all stored at paypal. I just have a hosted_button_id hidden field which tells it which button to use.
Yegor
@Yegor: Yes, you'd do it as a hidden field, or as a field on the query string of the URL, etc. -- just as with sending any other field from the client to the server.
T.J. Crowder
A: 

please help me,

i did not get the array return by the paypal.

Bundelkhand Darshan