开发者

PayPal IPN Account Tracking, How is it accomplished?

I'm trying to write an IPN that, upon successful transaction, modifies a database entry (like as to increment a currency (like Envato does for their prepaid deposits)).

I've looked over the IPN variables a few times and I can't figure out how to track a user transac开发者_C百科tion, except for the payer's email (but this relies on the fact that the registered account's email is the same as the payer email (which is not always true).

I'd like to track it using an account ID, but while the IPN will reply with a custom variable, I can't transmit a dynamic variable (using the Buy Now button) for it to send back (like an account ID).

My question is, how can I send a dynamic variable with these buttons or track it an already established way?


You can transmit custom data via Paypal. Look at the custom variable.

So the scenario is this:

  • user logs in;
  • in the page which is before payment page, you either have hidden input having custom field set to user id or form it dynamically with Javascript;
  • custom field is not even shown to the payer when he/she confirms the payment;
  • when transaction happens, custom field is stored (so you can always look it up in Paypal website);
  • IPN notification sends you the custom field value (amongst other ones) which you can use for identifying the user.

I have got similar scenario working on a production system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜