我正在实施Recurring Express结帐。创建配置文件的代码正在运行。我现在要做的是传递一个自定义值。
我们可以通过
和
使用以下名称
PAYMENTREQUEST_n_CUSTOM
我想对CreateRecurringPaymentsProfile执行相同操作,以便我可以在IPN中访问它。
答案 0 :(得分:2)
CRPP不像其他API请求那样包含自定义参数,但它确实包含PROFILEREFERENCE参数,该参数应被视为发票ID。无论你在这里传递什么价值,都会在IPN中以rp_invoice_id返回。
因此,您可以在数据库中保存包含所需相关数据的本地发票记录,然后在CRPP请求的profilereference参数中传递该ID。然后在您的IPN脚本中,从rp_invoice_id中提取此值,然后使用该ID值从数据库中提取有关该发票所需的任何其他详细信息。
以下是包含rp_invoice_id的IPN示例。
Array
(
[mc_gross] => 6.45
[period_type] => Regular
[outstanding_balance] => 0.00
[next_payment_date] => 02:00:00 Feb 12, 2015 PST
[protection_eligibility] => Eligible
[payment_cycle] => Monthly
[address_status] => confirmed
[tax] => 0.00
[payer_id] => Q33PGJHM6K38Q
[address_street] => 375 HWY 21 n
[payment_date] => 02:12:06 Jan 12, 2015 PST
[payment_status] => Completed
[product_name] => USBSwiper Monthly Subscription
[charset] => windows-1252
[rp_invoice_id] => 1935
[recurring_payment_id] => I-FWEAAAAXPVJ
[address_zip] => 72616
[first_name] => Tester
[mc_fee] => 0.44
[address_country_code] => US
[address_name] => KARShop
[notify_version] => 3.8
[amount_per_cycle] => 6.45
[payer_status] => verified
[currency_code] => USD
[business] => payments@domain.com
[address_country] => United States
[address_city] => Berryville
[verify_sign] => AtjWedapewmudDbf6C3S0..Z.7glAyXhJISOoiYcafN1Zb.VrOX7O8VH
[payer_email] => tester@gmail.com
[initial_payment_amount] => 0.00
[profile_status] => Active
[amount] => 6.45
[txn_id] => 5G2211475Y5810638
[payment_type] => instant
[payer_business_name] => Testers, LLC
[last_name] => Testerson
[address_state] => AR
[receiver_email] => payments@domain.com
[payment_fee] => 0.44
[receiver_id] => M5VRAQYEFCSK6
[txn_type] => recurring_payment
[mc_currency] => USD
[residence_country] => US
[transaction_subject] => USBSwiper Monthly Subscription
[payment_gross] => 6.45
[shipping] => 0.00
[product_type] => 1
[time_created] => 14:56:25 Apr 12, 2011 PDT
[ipn_track_id] => 9318cc3589f1b
)