[英]Can't send a soap request -Invalid API namespace-
我正在嘗試在laravel應用程序中發送帶有簡單curl調用的soap請求,但是我得到了下一個錯誤。
<faultcode>soap:Client</faultcode>
<faultstring>Invalid API namespace</faultstring>
這是XML請求
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:Security SOAP-ENV:mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>usename</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">randompass</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<soapenv:Body>
<requestMessage
xmlns="urn:schemas-cybersource-com:transaction-data-N.NN">
<merchantID>themerchantid</merchantID>
<merchantReferenceCode>the reference</merchantReferenceCode>
<billTo>
<firstName>Name</firstName>
<lastName></lastName>
<street1></street1>
<city></city>
<state></state>
<postalCode></postalCode>
<country></country>
<email>name@mail.com</email>
</billTo>
<item id="1">
<unitPrice>25</unitPrice>
<quantity>1</quantity>
</item>
<purchaseTotals>
<currency>EUR</currency>
</purchaseTotals>
<card>
<accountNumber>9898989898989898</accountNumber>
<expirationMonth>10</expirationMonth>
<expirationYear>20</expirationYear>
</card>
<ccAuthService run="true"/>
</requestMessage>
</soapenv:Body>
</soapenv:Envelope>
我不知道為什么我會收到這個錯誤。 請求有什么問題?
您當前的命名空間xmlns =“urn:schemas-cybersource-com:transaction-data-N.NN”應為xmlns =“urn:schemas-cybersource-com:transaction-data-1.155”
您還需要填充billTo字段,因為它們通常是必需的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.