无法发送soap请求-无效的API命名空间-

我正在尝试在 Laravel 应用程序中使用简单的 curl 调用发送肥皂请求,但出现下一个错误。


<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>

我不知道为什么会出现此错误。请求有什么问题?


弑天下
浏览 398回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP