Reputation: 161
I'm currently programming a small basket app and I was wondering what was the variable that would be used to differentiate between subcriptions for one user.
Let say my user has 4 subscriptions, and it is now the time to receive its recurring payment. I receive the payment message from Paypal, parse it and do my DB update. How do I know which recurring I need to process?
From what I read, its probably the subscr_id=I-HPDM8GP... that I need to check but I'm not sure?
Thanks
Upvotes: 0
Views: 566
Reputation: 26056
This is a pretty broad question so I'm going to have to make a couple of assumptions...
1) You're using standard subscription buttons..?? 2) You have a users table in your database already, and it relates to an orders/invoices table in your database by customer ID..??
If those assumptions are accurate, then what I would recommend is that you include the order ID from your system in the "invoice" parameter with the subscription button code.
If you're not already using it then it would be wise to setup an IPN solution to process subscription payments, and within the IPN data you would get the same order ID back in that "invoice" parameter, so within that solution you could update your system accordingly using that order ID which then relates back to your customer IDs in your own system.
With all of this data included and related correctly in your system you could easily pull reports for different users that include all of their subscriptions and payment history.
Upvotes: 1