gpt4 book ai didi

paypal - 将 CUSTOM 变量发送到 CreateRecurringPaymentsProfile

转载 作者:太空宇宙 更新时间:2023-11-03 16:17:54 24 4
gpt4 key购买 nike

我正在实现定期快速结账。创建配置文件的代码正在运行。我现在要做的是将自定义值传递给它。

我们可以通过

DoExpressCheckout

SetExpressCheckout

使用以下名称

PAYMENTREQUEST_n_CUSTOM

我想对 CreateRecurringPaymentsProfile 做同样的事情以便我可以在 IPN 中访问它。

最佳答案

CRPP 不像其他 API 请求那样包含自定义参数,但是它包含 PROFILEREFERENCE 参数,该参数将被视为发票 ID。您在此处传递的任何值都会作为 rp_invoice_id 在 IPN 中返回。

因此,您可以做的是在您的数据库中保存本地发票记录,其中包含您需要的任何相关数据,然后在 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
)

关于paypal - 将 CUSTOM 变量发送到 CreateRecurringPaymentsProfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27904766/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com