更正SOAP故障方法未实现错误

时间:2012-10-05 15:46:15

标签: soap curl paypal paypal-sandbox soap-client

好的,不确定这个问题是什么。我试图通过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>

2 个答案:

答案 0 :(得分:0)

解决了这个问题。 PayPal更改了此特定呼叫的沙盒api url,但未在其文档中更新。

答案 1 :(得分:0)

沙箱的新网址是&#34; https://api-3t.sandbox.paypal.com/2.0/&#34;。你可以在这里测试你的命令