Recurring payment IPN request rp_invoice_id field

断了今生、忘了曾经 提交于 2019-12-12 02:55:49

问题


Here is example of PayPal Express Checkout Recurring Payment IPN request:

 [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

As you can see, there is field called rp_invoice_id which is The merchant’s own unique reference or invoice number, which can be used to uniquely identify a profile.

When creating API call CreateRecurringPaymentsProfile, how to pass this value, which field should I set in the API call?

Thank you


回答1:


You need to use the PROFILEREFERENCE parameter to pass in a value that will be returned via IPN in the rp_invoice_id parameter.

PROFILEREFERENCE

(Optional) The merchant's own unique reference or invoice number.

Character length and limitations: 127 single-byte alphanumeric characters

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




回答2:


It will not work like this, newer versions of API are using REST calls.

To make this working you have to first download Paypal SDK. It is available at http://paypal.github.io/sdk/

Make sure you use official version of SDK, there might be chances that you may use different version and someone may be sitting there to steal your valuable information. My suggestion is before start working go through original documentation, to have an idea.

Once you install SDK, then you could use the example given in the link below

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

This will make API call.

Also you can try with complete documentation available at https://developer.paypal.com/webapps/developer/docs/api/

Happy Coding! Atul Jindal



来源:https://stackoverflow.com/questions/26037028/recurring-payment-ipn-request-rp-invoice-id-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!