尝试使用Paypal设置快速结账API获取Paypal令牌时出错

时间:2014-11-23 23:37:36

标签: curl paypal paypal-sandbox

我看过像我这样的问题,但没有什么可以帮助我。所以我在这里发布我的问题,并希望有人可以帮助我...

首先,请注意我使用Paypal API的新功能。

我尝试使用Paypal Express Checkout通过curl请求获取令牌以进行Paypal并行付款。暂时,我只是想在Unix终端上做这件事。

以下是我的参数(我使用沙箱):

USER=<caller_user_id>
PWD=<caller_password_id>
SIGNATURE=AiPC9BjkCyDFQXbSkoZcgqH3hpacAhUVQMHL2c.Lqcfp8FePSekEg2q8
METHOD=setExpressCheckout
RETURNURL=http://some.url
CANCELURL=http://someother.url
VERSION=93
PAYMENTREQUEST_0_CURRENCYCODE=EUR
PAYMENTREQUEST_0_AMT=80
PAYMENTREQUEST_0_PAYMENTACTION=Order
PAYMENTREQUEST_0_DESC=Cotisation
PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=sometest@account.tld
PAYMENTREQUEST_0_PAYMENTREQUESTID=order1
PAYMENTREQUEST_1_CURRENCYCODE=EUR
PAYMENTREQUEST_1_AMT=20
PAYMENTREQUEST_1_PAYMENTACTION=Order
PAYMENTREQUEST_1_ITEMAMT=20
PAYMENTREQUEST_1_TAXAMT=0
PAYMENTREQUEST_1_DESC=Comission
PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID=someother@account.tld
PAYMENTREQUEST_1_PAYMENTREQUESTID=order2
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_QTY1=1

这是我的卷曲请求:

curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d USER=mathieu.menut_api1.synerghetic.net &PWD=J9PC5K3EQZFLKLSF&SIGNATURE=AiPC9BjkCyDFQXbSkoZcgqH3hpacAhUVQMHL2c.Lqcfp8FePSekEg2q8&METHOD=SetExpressCheckout&RETURNURL=http://menutmathieu.fr&CANCELURL=http://google.com&VERSION=93&PAYMENTREQUEST_0_CURRENCYCODE=EUR&PAYMENTREQUEST_0_AMT=80&PAYMENTREQUEST_0_PAYMENTACTION=Order&PAYMENTREQUEST_0_ITEMAMT=80&PAYMENTREQUEST_0_TAXAMT=0&PAYMENTREQUEST_0_DESC=Cotisation&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=test@test.com&PAYMENTREQUEST_0_PAYMENTREQUESTID=order1&PAYMENTREQUEST_1_CURRENCYCODE=EUR&PAYMENTREQUEST_1_AMT=20&PAYMENTREQUEST_1_PAYMENTACTION=Order&PAYMENTREQUEST_1_ITEMAMT=20&PAYMENTREQUEST_1_TAXAMT=0&PAYMENTREQUEST_1_DESC=Comission&PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID=a@a.fr&PAYMENTREQUEST_1_PAYMENTREQUESTID=order2&L_PAYMENTREQUEST_0_QTY0=1&L_PAYMENTREQUEST_0_QTY1=1

以下是(完整的)答案:

[1] 6954
[2] 6955
[3] 6956
[4] 6957
[5] 6958
[6] 6959
[7] 6960
[8] 6961
[9] 6962
[10] 6963
[11] 6964
[12] 6965
[13] 6966
[14] 6967
[15] 6968
[16] 6969
[17] 6970
[18] 6971
[19] 6972
[20] 6973
[21] 6974
[22] 6975
[23] 6976
[24] 6977
[2]   Done                    PWD=J9PC5K3EQZFLKLSF
[3]   Done                    SIGNATURE=AiPC9BjkCyDFQXbSkoZcgqH3hpacAhUVQMHL2c.Lqcfp8FePSekEg2q8
[4]   Done                    METHOD=SetExpressCheckout
[5]   Done                    RETURNURL=http://menutmathieu.fr
[6]   Done                    CANCELURL=http://google.com
[7]   Done                    VERSION=93.0
[8]   Done                    PAYMENTREQUEST_0_CURRENCYCODE=EUR
[9]   Done                    PAYMENTREQUEST_0_AMT=80
[10]   Done                    PAYMENTREQUEST_0_PAYMENTACTION=Order
[11]   Done                    PAYMENTREQUEST_0_ITEMAMT=80
[12]   Done                    PAYMENTREQUEST_0_TAXAMT=0
[13]   Done                    PAYMENTREQUEST_0_DESC=Cotisation
[14]   Done                    PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=test@test.com
[15]   Done                    PAYMENTREQUEST_0_PAYMENTREQUESTID=order1
[16]   Done                    PAYMENTREQUEST_1_CURRENCYCODE=EUR
[17]   Done                    PAYMENTREQUEST_1_AMT=20
[18]   Done                    PAYMENTREQUEST_1_PAYMENTACTION=Order
[19]   Done                    PAYMENTREQUEST_1_ITEMAMT=20
[20]   Done                    PAYMENTREQUEST_1_TAXAMT=0
[21]   Done                    PAYMENTREQUEST_1_DESC=Comission
[22]   Done                    PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID=a@a.fr
[23]-  Done                    PAYMENTREQUEST_1_PAYMENTREQUESTID=order2
Bender:~ bardyl$ ACK=Failure&L_ERRORCODE0=81002&L_SHORTMESSAGE0=Unspecified%20Method&L_LONGMESSAGE0=Method%20Specified%20is%20not%20Supported&L_SEVERITYCODE0=Error
[1]-  Done                    curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d USER=mathieu.menut_api1.synerghetic.net
[24]+  Done                    L_PAYMENTREQUEST_0_QTY0=1

我真的不明白这是什么问题......如果我看到了返回的错误,它只是说该方法不受支持。但是当我阅读Paypal documentation时,我似乎正在使用好的。{/ p>

所以如果有人可以帮助我......

谢谢:)

0 个答案:

没有答案