以下是PayPal Express Checkout经常性支付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调用中设置哪个字段?
感谢
您需要使用PROFILEREFERENCE参数在rp_invoice_id参数中传递一个将通过IPN返回的值。
轮廓参考
(可选)商户自己的唯一参考号或发票编号。
字符长度和限制:127个单字节字母数字字符
https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/
它不会像这样工作,API的新版本正在使用REST调用。
要做到这一点,你必须首先下载贝宝SDK。可在http://paypal.github.io/sdk/
请确保您使用的是官方版本的SDK,您可能会使用不同的版本,有人可能会坐在那里窃取您的宝贵信息。我的建议是在开始工作之前先查看原始文档,有个想法。
一旦你安装了SDK,你就可以使用下面链接中给出的例子
https://devtools-paypal.com/guide/recurring_payment_cc/php?interactive=ON&env=沙箱
这将进行API调用。
您也可以尝试使用完整的文档,网址为https://developer.paypal.com/webapps/developer/docs/api/
快乐编码!Atul Jindal