2012-08-15 133 views
1

對不起,如果這已經回答了某個地方,但從我發現的,沒有人回答這個。PayPal訂閱+一次性訂單(NVP)

我會很快。我創建的功能允許快速生成PayPal字段,因此我們可以通過我們的定製CMS進行快速付款。通過這個,我們可以創建多個一次性付款或訂閱,但是,看起來我們不能同時進行這兩種付款或訂閱。下面是我想要實現(版本63)的例子:

Array 
(
    [L_PAYMENTREQUEST_0_NAME0] => XXXXXX 
    [L_PAYMENTREQUEST_0_DESC0] => XXXXXXXXXX 
    [L_PAYMENTREQUEST_0_AMT0] => 97.00 
    [L_PAYMENTREQUEST_0_QTY0] => 1 
    [L_PAYMENTREQUEST_0_NUMBER0] => 112 

    [L_PAYMENTREQUEST_0_NAME1] => XXXXXX 
    [L_PAYMENTREQUEST_0_DESC1] => XXXXXXXXXXX 
    [L_PAYMENTREQUEST_0_AMT1] => 37.00 
    [L_PAYMENTREQUEST_0_QTY1] => 1 
    [L_PAYMENTREQUEST_0_NUMBER1] => 113 
    [L_BILLINGAGREEMENTDESCRIPTION1] => Subscription: XXXXXXXXX 
    [L_BILLINGTYPE1] => RecurringPayments 

    [METHOD] => SetExpressCheckout 
    [LANDINGPAGE] => Billing 
    [ALLOWNOTE] => 0 
    [RETURNURL] => http://XXXXXXXXXX/confirm-order 
    [CANCELURL] => http://XXXXXXXXXX/checkout/cancelled 
    [CURRENCYCODE] => AUD 
    [PAYMENTREQUEST_0_ITEMAMT] => 134 
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 0 
    [PAYMENTREQUEST_0_AMT] => 134 
    [PAYMENTREQUEST_0_CURRENCYCODE] => AUD 
    .... 

這就是我找回

[L_ERRORCODE0] => 10480 
[L_SHORTMESSAGE0] => Invalid Data 
[L_LONGMESSAGE0] => Invalid billing agreement type. 
[L_SEVERITYCODE0] => Error 

任何人都可以見識一下我做錯了什麼?我做了一些搜索,但所有結果都是空的。

謝謝!

回答

2

你缺少你的數據L_BILLINGTYPE0L_BILLINGAGREEMENTDESCRIPTION0,加入他們,你應該設置:)

+0

太棒了!之前應該看到這個。在最後一步,我開始設置我的產品進行訂閱,所以我猜只要'L_BILLINGAGREEMENTDESCRIPTION0'和'DESC'匹配,我就把它放入setExp並不重要。 – Dave 2012-08-15 03:30:26

+0

Dave,你提供了什麼L_BILLINGAGREEMENTDESCRIPTION0值? – 2017-09-14 13:23:14