由于参数无效,交易被拒绝。交易ID无效

时间:2014-10-02 11:29:45

标签: soap paypal paypal-sandbox ebay ebay-api

我在eBay上请求GetOrders时有一个TransactionID,但是当我发出PayPal GetTransactionDetails请求并提供它返回的值时,我收到以下错误:

Errors[] = 
    (ErrorType){
        ShortMessage = "Transaction refused because of an invalid argument. See additional error messages for details."
        LongMessage = "The transaction id is not valid"
        ErrorCode = "10004"
        SeverityCode = "Error"
    },

对于PayPal和eBay,我都有一个沙箱买家和卖家帐户,并且在eBay上,买家帐户已经从卖家帐户购买并支付了产品。付款显示在PayPal帐户和两个eBay帐户中,我已确认我正在使用PayPal凭据作为卖家帐户。

我发送的SOAP请求如下:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns="urn:ebay:api:PayPalAPI" xmlns:ns0="urn:ebay:apis:eBLBaseComponents" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="urn:ebay:api:PayPalAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header>
        <ns:RequesterCredentials>
            <ns:Credentials xmlns:ns="urn:ebay:apis:eBLBaseComponents">
                <ns:Username>VALUE</ns:Username>
                <ns:Password>VALUE</ns:Password>
                <ns:Signature>VALUE</ns:Signature>
            </ns:Credentials>
        </ns:RequesterCredentials>
    </SOAP-ENV:Header>
    <ns1:Body>
        <ns2:GetTransactionDetailsReq>
            <ns2:GetTransactionDetailsRequest>
                <ns0:Version>117.0</ns0:Version>
                <ns0:TransactionID>VALUE</ns0:TransactionID>
            </ns2:GetTransactionDetailsRequest>
        </ns2:GetTransactionDetailsReq>
    </ns1:Body>
</SOAP-ENV:Envelope>

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

似乎不正确的格式或名称空间。你可以试试这个:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ebay:apis:eBLBaseComponents" xmlns:ns2="urn:ebay:api:PayPalAPI">

<SOAP-ENV:Header>
    <ns2:RequesterCredentials>
      <ns1:Credentials>

         <ns1:Username>VALUE</ns1:Username>
        <ns1:Password>VALUE</ns1:Password>
        <ns1:Signature>VALUE</ns1:Signature>

      </ns1:Credentials>
    </ns2:RequesterCredentials>
</SOAP-ENV:Header>

  <SOAP-ENV:Body>
    <ns2:GetTransactionDetailsReq>
      <ns2:GetTransactionDetailsRequest>
        <ns1:Version>84.0</ns1:Version>

        <ns2:TransactionID>VALUE</ns2:TransactionID>
      </ns2:GetTransactionDetailsRequest>
    </ns2:GetTransactionDetailsReq>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>