【问题标题】:Send CUSTOM variable to CreateRecurringPaymentsProfile将 CUSTOM 变量发送到 CreateRecurringPaymentsProfile
【发布时间】:2015-03-10 09:11:54
【问题描述】:

我正在实施定期快速结帐。创建配置文件的代码正在运行。我现在要做的是传递一个自定义值。

我们可以通过

DoExpressCheckout

SetExpressCheckout

使用以下名称

PAYMENTREQUEST_n_CUSTOM

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

【问题讨论】:

    标签: paypal paypal-ipn payment-gateway paypal-sandbox paypal-subscriptions


    【解决方案1】:

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

    因此,您可以在数据库中保存包含您需要的任何相关数据的本地发票记录,然后将该 ID 传递到 CRPP 请求的 profilereference 参数中。然后在您的 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
    )
    

    【讨论】:

    • 谢谢。这似乎奏效了。我仍然不明白为什么贝宝省略了对 CRPP 自定义变量的支持。除了这个之外,那里的所有其他 api 调用都支持它。
    • 是的,有rp_invoice_id这样的字段。如果您没有在您的 IPN 中获得它,那么您不能在您的 CRPP 请求中包含 PROFILEREFERENCE 参数。我已经用包含它的 IPN 样本更新了答案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-29
    • 1970-01-01
    • 2019-05-21
    • 2011-10-17
    • 2016-08-20
    • 1970-01-01
    相关资源
    最近更新 更多