gpt4 book ai didi

php - PayPal Express Checkout API - 有没有一种方法可以使用方法 CreateRecurringPaymentsProfile 在一个 session 中处理这两种定期付款?

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

我尝试使用方法 CreateRecurringPaymentsProfile 在一个 session 中处理两笔定期付款。这是我的行动的时间顺序:

首先我设置方法 SetExpressCheckout:

'METHOD'                        => 'SetExpressCheckout',
'RETURNURL' => $this->paypalreturnurl,
'CANCELURL' => $this->paypalcancelurl,
'PAYMENTREQUEST_0_CURRENCYCODE' => $this->paypalcurrencycode,
'PAYMENTREQUEST_0_PAYMENTACTION'=> 'SALE',
'L_BILLINGTYPE0' => 'RecurringPayments',
'L_BILLINGAGREEMENTDESCRIPTION0'=> 'Tier 1 + Management Services',
'PAYMENTREQUEST_0_DESC' => 'Tier 1 + Management Services',
'L_PAYMENTREQUEST_0_NAME0' => 'Tier 1',
'L_PAYMENTREQUEST_0_NUMBER0' => '10101',
'L_PAYMENTREQUEST_0_QTY0' => '1',
'L_PAYMENTREQUEST_0_AMT0' => '0.02',
'L_PAYMENTREQUEST_0_DESC0' => 'Description of Tier 1',
'L_PAYMENTREQUEST_0_NAME1' => 'Management Services 8 hours - for $0.01',
'L_PAYMENTREQUEST_0_NUMBER1' => '212121',
'L_PAYMENTREQUEST_0_QTY1' => '1',
'L_PAYMENTREQUEST_0_AMT1' => '0.01',
'L_PAYMENTREQUEST_0_DESC1' => 'Description of Management Services 8 hours - for $0.01',
'PAYMENTREQUEST_0_ITEMAMT' => '0.03',
'PAYMENTREQUEST_0_AMT' => '0.03'

在 SetExpressCheckout 方法成功响应后,使用 CreateRecurringPaymentsProfile 方法成功执行第一次定期付款。这是参数:

'L_PAYMENTREQUEST_0_NAME0'      => 'Management Services 8 hours - for $0.01',
'PROFILEREFERENCE' => 'RPInvoice1234',
'PROFILESTARTDATE' => date('Y-m-d') . 'T' . date('H:i:s').'Z',
'SUBSCRIBERNAME' => 'Mr Sub Scriber',
'TOKEN' => urlencode($token),
'DESC' => 'Tier 1 + Management Services',
'AMT' => '0.01',
'BILLINGPERIOD' => 'Month',
'BILLINGFREQUENCY' => '1',
'TOTALBILLINGCYCLES' => '12',
'REGULARTOTALBILLINGCYCLES' => '1',
'VERSION' => '74.0',
'MAXFAILEDPAYMENTS' => '1',
'L_PAYMENTREQUEST_0_AMT0' => '0.01',
'INITAMT' => '0.01',
'L_PAYMENTREQUEST_0_NUMBER0' => '212121',
'L_PAYMENTREQUEST_0_QTY0' => '1',
'L_BILLINGTYPE0' => 'RecurringPayments',
'L_BILLINGAGREEMENTDESCRIPTION0'=> 'Tier 1 + Management Services',
'L_PAYMENTREQUEST_0_ITEMCATEGORY0'=> 'Digital'

在 CreateRecurringPaymentsProfile 方法成功响应后,我尝试使用类似的参数和 CreateRecurringPaymentsProfile 方法创建另一个定期付款(不幸的是没有成功):

'L_PAYMENTREQUEST_0_NAME0'      => 'Hosted Saas Tier 1',
'PROFILEREFERENCE' => 'RPInvoice123',
'PROFILESTARTDATE' => date('Y-m-d') . 'T' . date('H:i:s').'Z',
'SUBSCRIBERNAME' => 'Mr Sub Scriber 2',
'TOKEN' => urlencode($token),
'DESC' => 'Hosted Saas Tier 1 + Community Management Services',
'AMT' => '0.02',
'BILLINGPERIOD' => 'Month',
'BILLINGFREQUENCY' => '1',
'TOTALBILLINGCYCLES' => '12',
'REGULARTOTALBILLINGCYCLES' => '1',
'VERSION' => '74.0',
'MAXFAILEDPAYMENTS' => '1',
'L_PAYMENTREQUEST_0_AMT0' => '0.02',
'INITAMT' => '0.02',
'L_PAYMENTREQUEST_0_NUMBER0' => '10101',
'L_PAYMENTREQUEST_0_QTY0' => '1',
'L_BILLINGTYPE0' => 'RecurringPayments',
'L_BILLINGAGREEMENTDESCRIPTION0'=> 'Hosted Saas Tier 1 + Community Management Services',
'L_PAYMENTREQUEST_0_ITEMCATEGORY0'=> 'Digital'

不幸的是,这个方法总是返回同样的错误,不管我做了什么改变:

Profile description is invalid, L_ERRORCODE0 = 11581.

当我更改定期付款顺序时,同样的错误出现在标题为“管理服务 8 小时 - 0.01 美元”的第一次定期付款!?问题是每次第二次重复返回相同的错误 - “配置文件描述无效,L_ERRORCODE0 = 11581。”

我怎样才能让它工作?

最佳答案

您只能在一个 session 中调用 CreateRecurringPaymentsProfile 一次(一个 token )。您应该调用 SetExpressCheckout 以获取另一个 token 。

关于php - PayPal Express Checkout API - 有没有一种方法可以使用方法 CreateRecurringPaymentsProfile 在一个 session 中处理这两种定期付款?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32565213/

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