Ich versuche, die Seife API für Ezidebit zu verwenden, um alle Kunden in einer Liste abzurufen. Ihre Dokumentation für mich ist sehr verwirrend und scheint einige Dinge zu vermissen. Es könnte sein, dass ich nicht genug Fähigkeiten habe. hierSOAP API VERWENDUNG VON CURL
ist die Dokumentation: https://www.getpayments.com/docs/#getcustomerlist
Die aktuelle Antwort im bekommen ist:
a:ActionNotSupportedThe message with Action 'run' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
Hier ist mein Code: (ive meinen Schlüssel in der XML entfernt und ersetzt mit 000000000000000)
<?php
$soap_request ='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:px="https://px.ezidebit.com.au/">
<soapenv:Header/>
<soapenv:Body>
<px:GetCustomerList>
<px:DigitalKey>000000000000000</px:DigitalKey>
<px:CustomerStatus>ALL</px:CustomerStatus>
<px:OrderBy>EzidebitCustomerID</px:OrderBy>
<px:Order>ASC</px:Order>
<px:PageNumber>1</px:PageNumber>
</px:GetCustomerList>
</soapenv:Body>
</soapenv:Envelope>';
$header = array(
"Content-type: text/xml;charset=\"utf-8\"",
"Accept: text/xml",
"Cache-Control: no-cache",
"Pragma: no-cache",
"SOAPAction: \"run\"",
"Content-length: ".strlen($soap_request),
);
$soap_do = curl_init();
curl_setopt($soap_do, CURLOPT_URL, "https://api.ezidebit.com.au/v3-5/nonpci");
curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_TIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($soap_do, CURLOPT_POST, true);
curl_setopt($soap_do, CURLOPT_POSTFIELDS, $soap_request);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header);
$content = curl_exec($soap_do);
if(curl_exec($soap_do) === false) {
$err = 'Curl error: ' . curl_error($soap_do);
curl_close($soap_do);
print $err;
} else {
curl_close($soap_do);
print_r($content);
}
?>
Ich kann sehen, der Fehler bezieht sich auf die Kopfzeile für: "SOAPAction: \" run \ "", aber ich bin nicht sicher, was ich an seiner Stelle haben soll.
Hoffentlich kann mir jemand helfen.
Warum Sie die PHP-Seife api für diesen http://php.net/manual/en/book.soap.php – pinoyCoder
nicht verwenden habe ich nie verstanden, es :(Ich habe ein paar Mal versucht, aber nie meinen Kopf darum gewickelt. –
gut Sie versuchen, härter und ich empfehle auch lesen Sie die PHP-Fehlermeldung sorgfältig. – pinoyCoder