简体   繁体   English

支付IPN-支付集成问题-1个贝宝帐户上有多个订阅

[英]Payment IPN - Payment Integration Issue - Multiple subscriptions on 1 paypal account

I have an issue with our PayPal checkout system that we can't seem to figure out. 我的PayPal结帐系统存在问题,我们似乎无法解决。 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. 在我们的系统中,用户A必须登录到其帐户,然后单击相应的购物车并结帐。 This takes them to a PayPal checkout. 这会将他们带到PayPal结帐。 They sign in and confirm their purchase. 他们登录并确认购买。 This is a subscription that last for X days. 这是一个持续X天的订阅。

Now, that user logs out and logs in with User B (because they are the office manager) account and goes to the checkout. 现在,该用户注销并使用用户B(因为他们是办公室经理)帐户登录并转到结帐。 They login with the same PayPal account they had used previously to purchase upgrade on User A. They confirm the purchase. 他们使用以前用于在用户A上购买升级的相同PayPal帐户登录。他们确认购买。

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. 用户A已使用PayPal帐户1登录并从我们的服务购买了两个单独的订阅。 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. 用户A现在登录到用户C帐户,并再次使用相同的PayPal帐户重复该步骤。

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. 用户B告诉办公室经理他们不再希望升级其帐户,并要求经理进行处理。 User A (the manager) logs into that PayPal account used to purchase all of the subscriptions within that office and cancels User B subscription. 用户A(经理)登录到该PayPal帐户,该帐户用于购买该办公室内的所有订阅,并取消用户B的订阅。

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. 由于所有的订阅都是在续订时间到来时通过该帐户购买的,因此我们收到的IPN通知并未单独标识购买的内容。 It is basically saying that a payment was made on the account (because User A and User C) still have active subscriptions. 基本上是说,已经在帐户上付款(因为用户A和用户C)仍具有有效的订阅。 So on our end the system thinks User B is still active and they get a “free” upgrade that should have cancelled. 因此,在我们这一端,系统认为用户B仍处于活动状态,他们获得了应该取消的“免费”升级。

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. 也许这是我们需要进行的简单调整,以便从贝宝(PayPal)接收到的信息使我们能够正确识别这3次付款之间的情况,并仅使已进行续期付款的帐户保持活动状态。

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. 简而言之,您应该注意每个IPN中返回的订阅ID( subscr_id ),它将唯一地标识每个订阅。

  • 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 . 当每个用户创建其订阅时,您应该获得一个IPN,其txn_type设置为subscr_signup ,订阅ID在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 . 每次处理订阅付款时,您都应该获得一个IPN,其txn_type设置为subscr_payment ,而相关的订阅ID在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. 用户B取消后,您将获得一个IPN,其txn_type设置为subscr_cancel ,让您知道他们取消了订阅。 (The subscription ID will be in subscr_id .) (订阅ID将在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 ). 当用户B的订阅期限到期时,您将获得一个IPN,其txn_type设置为subscr_eot (同样,订阅ID在subscr_id )。 Once you get this IPN, you can deactivate the upgrade on this user's account. 获得此IPN后,您可以在该用户的帐户上停用升级。

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. 因此,如果您跟踪每个订阅ID及其所属的用户,应该很容易确定谁在付款,谁在付款。

在这种情况下,我们面临的问题是,在这种情况下,当我们取消一个帐户时,另一个帐户也将被取消。我们已经按照您所说的进行了设置。已经为所有这些用户从同一个贝宝帐户完成了付款。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM