付款IPN - 付款集成问题 - 1个paypal帐户的多个订阅

I have an issue with our PayPal checkout system that we can't seem to figure out. Here is the problem.

Let me setup the scenario properly:

User A = Office Manager of 3 realtors

User B = A realtor at that office

User C = Another realtor at the same office

User A is in charge of purchasing the upgrades to all of the realtors in this particular office (Users B &C). 

In our system User A would have to login to their account click to the appropriate cart and checkout. This takes them to a PayPal checkout. They sign in and confirm their purchase. This is a subscription that last for X days.

Now, that user logs out and logs in with User B (because they are the office manager) account and goes to the checkout. They login with the same PayPal account they had used previously to purchase upgrade on User A. They confirm the purchase.

So, lets reflect on what we have thus far. User A has logged in with PayPal account 1 and purchased two separate subscriptions from our service. Each having their own unique credentials.

Let’s move on,

User A now logs into User C account and repeats the steps checking out with the same PayPal account, again.

All is good up to this point because no one has cancelled their subscription payment. Now this is where it gets a little tricky.

User B tells the office manager they no longer want their account to be upgraded and ask the manager to handle it. User A (the manager) logs into that PayPal account used to purchase all of the subscriptions within that office and cancels User B subscription.

Now that this action has taken place this is where we are running into issues. Because all of the subscriptions were purchased under this one account when the time of renewal comes the IPN notice we receive is not individually identifying the purchases. It is basically saying that a payment was made on the account (because User A and User C) still have active subscriptions. So on our end the system thinks User B is still active and they get a “free” upgrade that should have cancelled.

I hope I explained this well enough. Maybe it’s a simple adjustment we need to make so that the information received from PayPal allows us to identify properly between the 3 payments and keep active only the accounts that have made a renewal payment.

Thanks!

In short, you should be paying attention to the subscription ID (subscr_id) that comes back in each IPN — that will uniquely identify each subscription.

  • When each user creates their subscriptions, you should be getting an IPN with txn_type set to subscr_signup, and a subscription ID in subscr_id.
  • Each time a subscription payment is processed, you should be getting an IPN with txn_type set to subscr_payment, and the relevant subscription ID in subscr_id.
  • When user B cancels, you'll get an IPN with txn_type set to subscr_cancel, letting you know that they cancelled their subscription. (The subscription ID will be in subscr_id.)
  • When the term of user B's subscription expires, you'll get an IPN with txn_type set to subscr_eot (and again, the subscription ID in subscr_id). Once you get this IPN, you can deactivate the upgrade on this user's account.

So, if you keep track of each subscription ID and which user it belongs to, it should be pretty easy to figure out who's paying and who isn't.

the problem we are facing in this case is that when we cancel one account then the other account also become canceled in this case.We have seted as you mentioned.Payment has been done from the same paypal account for all those users.