Php 由于地址无效,PayPal DoDirectPayment(SOAP API)事务失败
我正在尝试将PayPal模块集成到我们基于osCommerce的网站中,这是一个使用PayPal DoDirectPayment(SOAP)API通过PayPal执行信用卡授权/支付的插件。到目前为止,我已经:Php 由于地址无效,PayPal DoDirectPayment(SOAP API)事务失败,php,paypal,paypal-sandbox,Php,Paypal,Paypal Sandbox,我正在尝试将PayPal模块集成到我们基于osCommerce的网站中,这是一个使用PayPal DoDirectPayment(SOAP)API通过PayPal执行信用卡授权/支付的插件。到目前为止,我已经: 安装模块并使其正常工作 在PayPal沙箱中设置启用PaymentsPro的商户帐户 使用信用卡在沙箱中创建了买家帐户 已验证我们网站上的帐单地址与 存储在PayPal沙箱中的买家帐户的信用卡 我能够继续通过结帐过程的所有方式;但是,每次事务失败时,都会显示以下错误消息 无效数据(1
- 安装模块并使其正常工作
- 在PayPal沙箱中设置启用PaymentsPro的商户帐户
- 使用信用卡在沙箱中创建了买家帐户
- 已验证我们网站上的帐单地址与 存储在PayPal沙箱中的买家帐户的信用卡
由于地址无效,无法处理事务 我使用步骤调试(通过XDEBUG)来验证签出表单中指定的地址信息是否传递到cUrl请求中。在下面查找SOAP请求,它在发送前不久出现: 注意潜在的敏感信息已被更改;然而,我直接将PayPal沙盒中的地址与我们网站上的地址进行了比较——它们完全相同,并且符合API文档中列出的字段规范。第42页及以上 这个问题()表明等待可以解决沙箱的问题…但是我的帐户是在19日创建的,我仍然收到同样神秘的基于地址的拒绝 我也搜索了()和(),但没有发现任何有用的东西
任何帮助都将不胜感激。请求出错,因为您没有在“收货地址”字段中传递姓名。您需要在此处插入一个名称,然后该请求将适用于您。我运行了一些测试,一旦插入了名称,测试就会顺利通过。我还使用了98.0版,应该是最新版本。您当前正在将其设置为2.0
<ShipToAddress>
<Name></Name>
<Street1>1313 Park Forest</Street1>
<Street2></Street2>
<CityName>Batavia</CityName>
<StateOrProvince>OH</StateOrProvince>
<PostalCode>45103</PostalCode>
<Country>US</Country>
</ShipToAddress>
1313公园森林
巴达维亚
哦
45103
美国
您能否提供返回的完整API响应,以便我查看问题的原因。没问题;我已经添加了cUrl请求检索到的响应
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ns="urn:ebay:api:PayPalAPI">
<SOAP-ENV:Header>
<Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xsi:type="wsse:SecurityType"></Security>
<RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType">
<Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType">
<Username xsi:type="xs:string"></Username>
<Password xsi:type="xs:string"></Password>
<Signature xsi:type="xs:string"></Signature>
<Subject xsi:type="xs:string"></Subject>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body id="_0">
<DoDirectPaymentResponse xmlns="urn:ebay:api:PayPalAPI">
<Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2013-03-22T20:24:12Z</Timestamp>
<Ack xmlns="urn:ebay:apis:eBLBaseComponents">Failure</Ack>
<CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">94b4190427bbe</CorrelationID>
<Errors xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:ErrorType">
<ShortMessage xsi:type="xs:string">Invalid Data</ShortMessage>
<LongMessage xsi:type="xs:string">The transaction cannot be processed due to an invalid address.</LongMessage>
<ErrorCode xsi:type="xs:token">10540</ErrorCode>
<SeverityCode xmlns="urn:ebay:apis:eBLBaseComponents">Error</SeverityCode>
</Errors>
<Version xmlns="urn:ebay:apis:eBLBaseComponents">2.0</Version>
<Build xmlns="urn:ebay:apis:eBLBaseComponents">5479129</Build>
<Amount xsi:type="cc:BasicAmountType" currencyID="USD">13.96</Amount>
</DoDirectPaymentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<ShipToAddress>
<Name></Name>
<Street1>1313 Park Forest</Street1>
<Street2></Street2>
<CityName>Batavia</CityName>
<StateOrProvince>OH</StateOrProvince>
<PostalCode>45103</PostalCode>
<Country>US</Country>
</ShipToAddress>