使用SOAP的PayPalAPI

使用SOAP的PayPalAPI,api,soap,vbscript,asp-classic,paypal,Api,Soap,Vbscript,Asp Classic,Paypal,我需要使用PayPalAPI,使用SOAP,来获得我们的PayPal余额 我已经用这个XML提出了一个请求: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV=

我需要使用PayPalAPI,使用SOAP,来获得我们的PayPal余额

我已经用这个XML提出了一个请求:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/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/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
<SOAP-ENV:Header>
<RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType">
<Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType">
<Username>[xxxxx]</Username>
<Password>[xxxxx]</Password>
<Signature>[xxxxx]</Signature>
<Subject>
</Subject>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<GetBalanceReq xsi:type="GetBalanceRequest">
<GetBalanceRequest xsi:type="GetBalanceRequestType">
<Version>83.0</Version>
<ReturnAllCurrencies>0</ReturnAllCurrencies>
</GetBalanceRequest>
</GetBalanceReq>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
…但我得到的回应是:

<SOAP-ENV:Envelope "...">
   <SOAP-ENV:Header>
    "..."
   </SOAP-ENV:Header>
   <SOAP-ENV:Body id="_0">
      <GetBalanceResponse xmlns="urn:ebay:api:PayPalAPI">
         <Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2011-10-20T17:27:54Z</Timestamp>
         <Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack>
         <CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">e6bb1ac6861d7</CorrelationID>
         <Version xmlns="urn:ebay:apis:eBLBaseComponents">83.0</Version>
         <Build xmlns="urn:ebay:apis:eBLBaseComponents">2183220</Build>
         <Balance xsi:type="cc:BasicAmountType" currencyID="USD">0.00</Balance>
         <BalanceTimeStamp xsi:type="xs:dateTime">2011-10-20T17:27:54Z</BalanceTimeStamp>
      </GetBalanceResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP-ENV:ClientMethod“GetBalanceReq”未实现


我的XML看起来正常吗?

您可以省略凭证标题中的可选部分。可能您没有选择正确的端点—getBalance似乎不可用。以下SOAP请求适用于:

答复如下:

<SOAP-ENV:Envelope "...">
   <SOAP-ENV:Header>
    "..."
   </SOAP-ENV:Header>
   <SOAP-ENV:Body id="_0">
      <GetBalanceResponse xmlns="urn:ebay:api:PayPalAPI">
         <Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2011-10-20T17:27:54Z</Timestamp>
         <Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack>
         <CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">e6bb1ac6861d7</CorrelationID>
         <Version xmlns="urn:ebay:apis:eBLBaseComponents">83.0</Version>
         <Build xmlns="urn:ebay:apis:eBLBaseComponents">2183220</Build>
         <Balance xsi:type="cc:BasicAmountType" currencyID="USD">0.00</Balance>
         <BalanceTimeStamp xsi:type="xs:dateTime">2011-10-20T17:27:54Z</BalanceTimeStamp>
      </GetBalanceResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>