【问题标题】:Recurring payment IPN request rp_invoice_id field定期付款 IPN 请求 rp_invoice_id 字段
【发布时间】:2014-11-20 03:14:11
【问题描述】:

以下是 PayPal Express Checkout Recurring Payment IPN 请求的示例:

 [mc_gross] => 6.56
    [period_type] =>  Regular
    [outstanding_balance] => 0.00
    [next_payment_date] => 03:00:00 Jun 21, 2012 PDT
    [protection_eligibility] => Ineligible
    [payment_cycle] => Weekly
    [tax] => 0.00
    [payer_id] => K48P3Fxxxx
    [payment_date] => 16:52:28 Jun 14, 2012 PDT
    [payment_status] => Completed
    [product_name] => Virtual Subscription $6.56 / week for 3 weeks
    [charset] => windows-1252
    [rp_invoice_id] => 208
    [recurring_payment_id] => I-4DHKxxxx
    [first_name] => Test
    [mc_fee] => 0.38
    [notify_version] => 3.4
    [amount_per_cycle] => 6.56
    [payer_status] => verified
    [currency_code] => USD
    [business] => xxxx@gmail.com
    [verify_sign] => AlAlnsACWRTf4OV6vRMZG4sCyEdYACBnr7ishagKt60BxtlJgPjaRIAh
    [payer_email] => xxxx@gmail.com
    [initial_payment_amount] => 0.00
    [profile_status] => Active
    [amount] => 6.56
    [txn_id] => 3PE0612xxxx
    [payment_type] => instant
    [last_name] => User
    [receiver_email] => xxxx@gmail.com
    [payment_fee] => 0.38
    [receiver_id] => TYDEKWLxxxx
    [txn_type] => recurring_payment
    [mc_currency] => USD
    [residence_country] => US
    [test_ipn] => 1
    [transaction_subject] => Virtual Subscription $6.56 / week for 3 weeks
    [payment_gross] => 6.56
    [shipping] => 0.00
    [product_type] => 1
    [time_created] => 23:48:22 Jun 13, 2012 PDT
    [ipn_track_id] => b2c853ddxxxx

如您所见,有一个名为 rp_invoice_id 的字段,它是商家自己的唯一参考号或发票号,可用于唯一标识个人资料。

创建API调用CreateRecurringPaymentsProfile时,如何传递这个值,API调用中应该设置哪个字段?

谢谢

【问题讨论】:

    标签: php paypal paypal-ipn


    【解决方案1】:

    您需要使用 PROFILEREFERENCE 参数传入一个值,该值将通过 IPN 在 rp_invoice_id 参数中返回。

    个人资料参考

    (可选)商家自己的唯一参考号或发票号。

    字符长度和限制:127 个单字节字母数字字符

    https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/

    【讨论】:

    • 正是我搜索的内容。谢谢!
    【解决方案2】:

    它不会像这样工作,新版本的 API 正在使用 REST 调用。

    要使其正常工作,您必须先下载 Paypal SDK。可通过http://paypal.github.io/sdk/获得它

    请确保您使用的是官方版本的 SDK,您可能会使用不同的版本,并且有人可能会坐在那里窃取您的宝贵信息。我的建议是在开始工作之前先阅读原始文档,然后有一个想法。

    安装 SDK 后,您可以使用下面链接中给出的示例

    https://devtools-paypal.com/guide/recurring_payment_cc/php?interactive=ON&env=sandbox

    这将进行 API 调用。

    您也可以尝试使用https://developer.paypal.com/webapps/developer/docs/api/ 上提供的完整文档

    编码愉快! 阿图尔·金达尔

    【讨论】:

    • 不确定我是否理解您的回答?有什么特殊原因导致它不应该通过调用 NVP API 来工作吗?
    • 它会工作得很好。这是不正确的信息。我会尽快发布答案。
    猜你喜欢
    • 2011-11-28
    • 2017-09-09
    • 2014-01-23
    • 2012-11-07
    • 2016-10-01
    • 2016-10-27
    • 2011-12-02
    • 2013-06-09
    相关资源
    最近更新 更多