[英]What kind of ipn response is recieved on subscription deactivation from within paypal?
我首先要向我的客戶收取即時付款的費用,然后創建一個訂閱配置文件。 這是我收到的IPN。
我想這是即時付款:
[2016-10-31 16:26:11] local.INFO: IPN RESPONSE:Array
(
[mc_gross] => 9.99
[invoice] => 49
[protection_eligibility] => Ineligible
[item_number1] =>
[payer_id] => FA5XLVU3CLN92
[tax] => 0.00
[payment_date] => 09:26:06 Oct 31, 2016 PDT
[payment_status] => Completed
[charset] => windows-1252
[mc_shipping] => 0.00
[mc_handling] => 0.00
[first_name] => omer
[mc_fee] => 0.59
[notify_version] => 3.8
[custom] =>
[payer_status] => verified
[business] => business@gmail.com
[num_cart_items] => 1
[mc_handling1] => 0.00
[verify_sign] => A8SKEyFJtpw0I2pUVRQ9wRhpVLh9AnPjeq8ltcpWBhIHlTZuf.ak4aa-
[payer_email] => customer@gmail.com
[mc_shipping1] => 0.00
[tax1] => 0.00
[txn_id] => 3J610862594926351
[payment_type] => instant
[last_name] => farooq
[item_name1] => Product 1
[receiver_email] => business@gmail.com
[payment_fee] => 0.59
[quantity1] => 1
[receiver_id] => RSDJM66ZP7LZ8
[txn_type] => cart
[mc_gross_1] => 9.99
[mc_currency] => USD
[residence_country] => US
[test_ipn] => 1
[transaction_subject] => 49
[payment_gross] => 9.99
[ipn_track_id] => af46df962d1bf
[cmd] => _notify-validate
)
這應該用於訂閱配置文件:
[2016-10-31 16:27:09] local.INFO: IPN RESPONSE:Array
(
[payment_cycle] => every 12 Months
[txn_type] => recurring_payment_profile_created
[last_name] => farooq
[next_payment_date] => 03:00:00 Oct 31, 2016 PDT
[residence_country] => US
[initial_payment_amount] => 0.00
[currency_code] => USD
[time_created] => 09:26:08 Oct 31, 2016 PDT
[verify_sign] => AwD4sJJmdrzDKNGw7KMAMuZSx1AHAJkBGoIT8Zl86XtmqM9xpRo7woGm
[period_type] => Regular
[payer_status] => verified
[test_ipn] => 1
[tax] => 0.00
[payer_email] => customer@gmail.com
[first_name] => omer
[receiver_email] => business@gmail.com
[payer_id] => FA5XLVU3CLN92
[product_type] => 1
[shipping] => 0.00
[amount_per_cycle] => 9.99
[profile_status] => Active
[charset] => windows-1252
[notify_version] => 3.8
[amount] => 9.99
[outstanding_balance] => 0.00
[recurring_payment_id] => I-R159BJH8WJHF
[product_name] => 49
[ipn_track_id] => 45f60995a00
[cmd] => _notify-validate
)
現在,我的問題是,如果有人取消了其使用Paypal帳戶的訂閱功能,該怎么辦? 顯然,我認為我不會在下一個計費周期收到ipn響應。 還是Paypal向您發回一些消息說預訂已被取消激活?
我是否一直在尋找是否在某個結算日收到了ipn,並且如果我沒有收到ipn,我只是假設他們可能已經從Paypal內取消了訂閱。
這是最好的方法嗎? 如果可能,您能否解釋一下如何在系統上工作?
實際上,幾年前我做了一篇文章,解釋了可以為訂閱生成的所有不同類型的IPN。 如果您想閱讀完整的答案,我已經將其重新發布到了我的個人博客上 ,但這是一個簡短的答案:您將獲得一個IPN,內容為txn_type=recurring_payment_profile_cancel
。 一旦買方取消訂閱,就應該發生這種情況。
現在...如果買家在訂閱過程中取消,則在結算周期結束時,您將獲得第二個IPN,其txn_type=recurring_payment_expired
已到期。 舉例來說,如果你有一個訂閱,賬單每12個月,6個月后買家取消,你會得到一個IPN txn_type=recurring_payment_profile_cancel
在他們取消它的時候,另一個IPN與txn_type=recurring_payment_expired
末12個月的付款期限(例如,貝寶應該在接下來的12個月內進行結算)。 這個想法是,即使買家僅在6個月后就取消了付款,他也已經支付了12個月的費用。 本質上講, recurring_payment_expired
IPN是一個通知您,說“嘿,此人的訂閱已經完成-現在您應該停用向其提供的任何產品/服務”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.