teRecurringPaymentsProfile方法在一个会

teRecurringPaymentsProfile方法在一个会

本文介绍了PayPal Express Checkout API-是否可以使用CreateRecurringPaymentsProfile方法在一个会话中处理两种重复付款?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用CreateRecurringPaymentsProfile方法在一个会话中处理两次定期付款.这是我的行动时间表:

I tried to process two recurring payment in one session using method CreateRecurringPaymentsProfile. Here is the chronology of my actions:

首先,我设置方法SetExpressCheckout:

First I set method 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方法成功执行了第一笔定期付款 .参数如下:

After successful response from SetExpressCheckout method, the first recurring payment is executed successfully using CreateRecurringPaymentsProfile method. Here is the parameters:

'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方法来创建另一个定期付款(很遗憾没有成功):

After the successful response from CreateRecurringPaymentsProfile method, I tried to create another recurring payment ( unfortunately without success ) using similar parameters and again CreateRecurringPaymentsProfile method:

'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'

不幸的是,无论我进行了什么更改,此方法总是返回相同的错误:

Unfortunately this method always return the same error, regardless the changes I made:

当我更改重复付款订单时,标题为"Management Services 8 hours-for $ 0.01"的第一次重复付款出现相同的错误!问题在于,每秒钟重复发生一次,都会返回相同的错误-配置文件描述无效,L_ERRORCODE0 = 11581."

When I change the recurring payments order the same error appears for the first recurring payment with title "Management Services 8 hours - for $0.01" !? The problem is that every time second recurring returns the same error - "Profile description is invalid, L_ERRORCODE0 = 11581."

我该如何工作?

推荐答案

最后,在PayPal支持的帮助下,我找到了一种在单个Express Checkout会话中创建多个重复配置文件的解决方案:

Finally, with a little help from the PayPal support, I find a solution to create multiple recurring profiles in a single Express Checkout session:

  • 首先,您必须在SetExpressCheckout方法中同时传递两个配置文件(第一个我的示例中的方法),例如:
  • First you must Pass both Profiles in SetExpressCheckout method (firstmethod in my example), for example:

L_BILLINGAGREEMENTDESCRIPTION0 =等级1

L_BILLINGAGREEMENTDESCRIPTION0=Tier 1

和第二个产品

L_BILLINGAGREEMENTDESCRIPTION1 =管理服务

L_BILLINGAGREEMENTDESCRIPTION1=Management Services

  • 然后,在买方在PayPal中都批准了这两项之后,您需要两次调用CreateRecurringPaymentsProfile :
    • And then, after buyer has approved both in PayPal, you need to call CreateRecurringPaymentsProfile twice:
    • 一个发送值为"Tier 1"的"DESC",另一个发送值为"Management Services"的"DESC"

      也检查一下

      这篇关于PayPal Express Checkout API-是否可以使用CreateRecurringPaymentsProfile方法在一个会话中处理两种重复付款?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 20:30