1

好的,不知道这个问题是什么。我正在尝试通过 cURL 向 PayPal 发布 API 请求,我得到以下结果。我的通话中是否缺少某些会导致这种情况的东西?

根据 PayPal 的说法,调用是正确的,当我使用 PHP cURL 包装函数时它工作正常......很奇怪。

感谢您的帮助!

curl https://api.sandbox.paypal.com/2.0/ -H "X-PAYPAL-SECURITY-USERID: api1.sitetest.com" -H "X-PAYPAL-SECURITY-PASSWORD: 111222222UH24" -H "X-PAYPAL-DEVICE-IPADDRESS: 170.10.125.52" -H "X-PAYPAL-MESSAGE-PROTOCOL: SOAP11" -H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" -E "/Users/Me/Library/PayPal_Keys/cert_key_pem.txt" -d "<SOAP-ENV:Envelope xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><SOAP-ENV:Header /><SOAP-ENV:Body><CreateAndSendInvoiceRequest><requestEnvelope><errorLanguage>en_US</errorLanguage></requestEnvelope><invoice><merchantEmail>sweet@sweetsounds.com</merchantEmail><payerEmail>me@testsite.com</payerEmail><businessName>Test Business, Inc.</businessName><logoURL></logoURL><itemList><item><name>Test Item</name><quantity>2</quantity><unitPrice>5.79</unitPrice><taxName>sales</taxName><taxRate>6.0</taxRate></item></itemList></invoice></CreateAndSendInvoiceRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>"

退货

<SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Method not implemented</faultstring></SOAP-ENV:Fault>
4

2 回答 2

0

解决了这个问题。PayPal 更改了此特定调用的沙盒 api url,并没有在他们的文档中更新它。

于 2012-10-05T15:55:17.243 回答
0

沙盒的新网址是“ https://api-3t.sandbox.paypal.com/2.0/ ”。你可以在这里测试你的命令

于 2017-05-18T06:05:26.087 回答