【问题标题】:Paypal Payment Failure for Recurring Payment API IPN's txn_typePaypal Payment Failure for Recurring Payment API IPN 的 txn_type
【发布时间】:2013-07-17 20:14:50
【问题描述】:

我正在使用 Paypal Pro 实现 Recurring Payment API。我的问题是当付款失败时,我收到一个 IPN,它的 txn_type 是什么?我期待的所有 IPN 是什么?这样我就可以在我的 IPNhandler 类中处理好。

【问题讨论】:

    标签: paypal paypal-ipn


    【解决方案1】:

    使用定期付款时您可以获得的可能 txn_type 包括:

    recurring_payment_profile_created

    recurring_payment_profile_cancel

    recurring_payment_profile_modify

    recurring_payment

    recurring_payment_skipped

    recurring_payment_failed

    recurring_payment_suspended_due_to_max_failed_pa​​yment

    在大多数情况下,当付款失败时,您会收到跳过的通知。我很少看到实际的失败通知。我从来没有得到任何关于为什么会这样的答案。

    这里有一些示例。

    Array
    (
        [payment_cycle] => Monthly
        [txn_type] => recurring_payment_skipped
        [last_name] => Testerson
        [next_payment_date] => 03:00:00 Oct 24, 2012 PDT
        [residence_country] => US
        [initial_payment_amount] => 0.00
        [rp_invoice_id] => 3250
        [currency_code] => USD
        [time_created] => 15:42:49 Sep 19, 2012 PDT
        [verify_sign] => AH1WkYze3JQ1xNtDm31SsDJxLeGrAxPpeVKBrMHLFmRVOWXnZep95xOm
        [period_type] =>  Regular
        [payer_status] => unverified
        [test_ipn] => 1
        [tax] => 0.00
        [payer_email] => test@hey.com
        [first_name] => Tester
        [receiver_email] => usb_1329725429_biz@angelleye.com
        [payer_id] => TP7CXHP6TVNSS
        [product_type] => 1
        [shipping] => 0.00
        [amount_per_cycle] => 1.95
        [profile_status] => Active
        [charset] => windows-1252
        [notify_version] => 3.7
        [amount] => 1.95
        [outstanding_balance] => 0.00
        [recurring_payment_id] => I-0SAH6FDN3JJA
        [product_name] => USBSwiper Monthly Subscription
        [ipn_track_id] => f2380796ce7c
    )
    
    
    
    Array
    (
        [payment_cycle] => Monthly
        [txn_type] => recurring_payment_failed
        [last_name] => Garcia
        [next_payment_date] => 02:00:00 Feb 12, 2012 PST
        [residence_country] => US
        [initial_payment_amount] => 0.00
        [rp_invoice_id] => 939
        [currency_code] => USD
        [time_created] => 16:29:33 Jan 29, 2010 PST
        [verify_sign] => A5rGTRcXhg6p48uIMYaPQKo7dsKqAO89FRXvCmuAfV5EYGWkAAD0vbPc
        [period_type] =>  Regular
        [payer_status] => unverified
        [tax] => 0.00
        [payer_email] => testpayer@hey.com
        [first_name] => Maria
        [receiver_email] => testreceiver@hey.com
        [payer_id] => EJ8JBQ63VHECL
        [product_type] => 1
        [shipping] => 0.00
        [amount_per_cycle] => 4.95
        [profile_status] => Active
        [charset] => windows-1252
        [notify_version] => 3.4
        [amount] => 4.95
        [outstanding_balance] => 14.85
        [recurring_payment_id] => I-S3APFHH0KFJ2
        [product_name] => USBSwiper Monthly Subscription
        [ipn_track_id] => Gi2zp.DfhsYitm8Kd0Dn3g
    )
    
    Array
    (
        [payment_cycle] => Monthly
        [txn_type] => recurring_payment_suspended_due_to_max_failed_payment
        [last_name] => Nom_3
        [next_payment_date] => N/A
        [residence_country] => CA
        [initial_payment_amount] => 0.00
        [rp_invoice_id] => 3245
        [currency_code] => USD
        [time_created] => 10:53:25 Mar 14, 2012 PDT
        [verify_sign] => AptDZCkTZINE6OhArrkjyIYauY8GAGO.XoBdyMW5t7SoHPSC8DOFS9kB
        [period_type] =>  Regular
        [payer_status] => unverified
        [test_ipn] => 1
        [tax] => 0.00
        [payer_email] => sandbox@hey.com
        [first_name] => Prenom_3
        [receiver_email] => usb_1329725429_biz@angelleye.com
        [payer_id] => TP7CXHP6TVNSS
        [product_type] => 1
        [shipping] => 0.00
        [amount_per_cycle] => 1.95
        [profile_status] => Suspended
        [charset] => windows-1252
        [notify_version] => 3.4
        [amount] => 1.95
        [outstanding_balance] => 1.95
        [recurring_payment_id] => I-CEBHH0K0V7T1
        [product_name] => USBSwiper Monthly Subscription
        [ipn_track_id] => d09d07fdd833
    )
    
    Array
    (
        [mc_gross] => 1.95
        [period_type] =>  Regular
        [outstanding_balance] => 0.00
        [next_payment_date] => 03:00:00 Aug 18, 2013 PDT
        [protection_eligibility] => Ineligible
        [payment_cycle] => Monthly
        [address_status] => confirmed
        [tax] => 0.00
        [payer_id] => E7BTGVXBFSUAU
        [address_street] => 1 Main St
        [payment_date] => 05:00:34 Jul 18, 2013 PDT
        [payment_status] => Completed
        [product_name] => USBSwiper Monthly Subscription
        [charset] => windows-1252
        [rp_invoice_id] => 3275
        [recurring_payment_id] => I-R0KGNCTUYAVW
        [address_zip] => 95131
        [first_name] => Drew
        [mc_fee] => 0.15
        [address_country_code] => US
        [address_name] => Drew Angell's Test Store
        [notify_version] => 3.7
        [amount_per_cycle] => 1.95
        [payer_status] => verified
        [currency_code] => USD
        [business] => usb_1329725429_biz@angelleye.com
        [address_country] => United States
        [address_city] => San Jose
        [verify_sign] => AOX9jItnq2qBtXeyCB5nhWVdWyqEAScu5FToCodROuhjlKYjtDeAdlmL
        [payer_email] => sandbo_1204199080_biz@angelleye.com
        [initial_payment_amount] => 0.00
        [profile_status] => Active
        [amount] => 1.95
        [txn_id] => 9PD943662S291292G
        [payment_type] => instant
        [payer_business_name] => Drew Angell's Test Store
        [last_name] => Angell
        [address_state] => CA
        [receiver_email] => usb_1329725429_biz@angelleye.com
        [payment_fee] => 0.15
        [receiver_id] => C9TAVNJFATXCS
        [txn_type] => recurring_payment
        [mc_currency] => USD
        [residence_country] => US
        [test_ipn] => 1
        [transaction_subject] => USBSwiper Monthly Subscription
        [payment_gross] => 1.95
        [shipping] => 0.00
        [product_type] => 1
        [time_created] => 15:10:22 Jun 18, 2013 PDT
        [ipn_track_id] => 28067cf6ae8f
    )
    
    Array
    (
        [payment_cycle] => Monthly
        [txn_type] => recurring_payment_profile_created
        [last_name] => Angell
        [next_payment_date] => 03:00:00 Jun 18, 2013 PDT
        [residence_country] => US
        [initial_payment_amount] => 0.00
        [rp_invoice_id] => 3275
        [currency_code] => USD
        [time_created] => 15:10:22 Jun 18, 2013 PDT
        [verify_sign] => ANrMRzzgbWP1I9ntjeVxAzQDTVjbATTckkxc4RtXKTYHoCoFDbklKPpd
        [period_type] =>  Regular
        [payer_status] => verified
        [test_ipn] => 1
        [tax] => 0.00
        [payer_email] => sandbo_1204199080_biz@angelleye.com
        [first_name] => Drew
        [receiver_email] => usb_1329725429_biz@angelleye.com
        [payer_id] => E7BTGVXBFSUAU
        [product_type] => 1
        [payer_business_name] => Drew Angell's Test Store
        [shipping] => 0.00
        [amount_per_cycle] => 1.95
        [profile_status] => Active
        [charset] => windows-1252
        [notify_version] => 3.7
        [amount] => 1.95
        [outstanding_balance] => 0.00
        [recurring_payment_id] => I-R0KGNCTUYAVW
        [product_name] => USBSwiper Monthly Subscription
        [ipn_track_id] => 1bf251e429b9c
    )
    

    【讨论】:

    • 感谢您的回复。这很有意义。现在我知道要处理哪些情况。我不确定的另一件事是,如果我获得 Recurring_Payment_Skipped IPN,Paypal 是否会在未结余额中添加金额?
    • 它会进入未结余额,是的,他们的系统会在 5 天后自动重试。它将重试 3 次,如果所有 3 次重试都失败,它将因最大付款失败而暂停配置文件,您将收到该通知。
    • 谢谢,如果通过 Paypal 或使用 ManageRecurringPaymentsProfileStatus 从 API 取消定期配置文件,我们还能重新激活它吗?
    • 如果完全取消,您将无法重新激活它。只有在暂停时您才能这样做。
    • @AndrewAngell 澄清一下,当支付失败并达到最大失败支付次数时,您会收到失败通知,然后是暂停通知?
    【解决方案2】:

    Andrew 相同,但扩展了跳过和失败的工作方式(据我所知):

    recurring_payment_profile_created - 创建配置文件的时间。重要的是要注意 recurring_payment_id,这是您取消/暂停/修改配置文件所需要的。

    recurring_payment_profile_cancel - 个人资料被取消时。

    recurring_payment_profile_modify - 修改个人资料时。

    recurring_payment - 当您收到定期付款时。

    recurring_payment_skipped - 当 PayPal 收款失败并将在 5 天后重试时。

    recurring_payment_failed - 当 MAXFAILEDPAYMENTS 未设置时,PayPal 将尝试 3 次,如果全部失败,这将是第三个 IPN。

    recurring_payment_suspended_due_to_max_failed_pa​​yment - 当设置了 MAXFAILEDPAYMENTS 时,当达到最大值时,这将是 IPN,而不是 recurring_payment_failed。

    【讨论】:

    • 抱歉打扰了。如果 MAXFAILEDPAYMENTS 未设置或设置为 0,则从文档中说 Paypal 将尝试为无限次尝试收集资金。但是在您的回答中,您说 Paypal 最多会尝试 3 次?哪一个是正确的?如果 MAXFAILEDPAYMENTS 设置为 0 并且 Paypal 在第三次尝试中未能收取资金,Paypal 会暂停配置文件吗?如果不是,下次定期付款会怎样?将是下一次经常性的任何未结金额?
    猜你喜欢
    • 2013-06-12
    • 2014-04-07
    • 2019-01-15
    • 2014-11-11
    • 2011-06-27
    • 2013-06-16
    • 2013-09-30
    • 2015-07-18
    • 2018-06-18
    相关资源
    最近更新 更多