我在调用Ezidebit SOAP调用时遇到以下错误。
a:ActionNotSupported带有操作"https://api.demo.ezidebit.com.au/v3-5/nonpci"的消息无法在接收方处理,因为端点调度程序的合约过滤器不匹配。这可能是由于协定不匹配(发送方和接收方之间的操作不匹配(或发送方和接收方之间的绑定/安全不匹配。检查发送方和接收方是否具有相同的协定和相同的绑定(包括安全要求,例如消息、传输、无(
以下是EZIDEBIT createSchedule的链接:
https://www.getpayments.com/docs/#createschedule
$xml_post_string = '<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:px="https://px.ezidebit.com.au/">
<soapenv:Header />
<soapenv:Body>
<px:CreateSchedule>
<px:DigitalKey>49A67D1B-DF3F-4013-B13A-A5E9E41E8873</px:DigitalKey>
<px:EziDebitCustomerID />
<px:YourSystemReference>102</px:YourSystemReference>
<px:ScheduleStartDate>2011-03-05</px:ScheduleStartDate>
<px:SchedulePeriodType>W</px:SchedulePeriodType>
<px:DayOfWeek>MON</px:DayOfWeek>
<px:DayOfMonth>5</px:DayOfMonth>
<px:FirstWeekOfMonth>Y</px:FirstWeekOfMonth>
<px:SecondWeekOfMonth>Y</px:SecondWeekOfMonth>
<px:ThirdWeekOfMonth>Y</px:ThirdWeekOfMonth>
<px:FourthWeekOfMonth>Y</px:FourthWeekOfMonth>
<px:PaymentAmountInCents>4000</px:PaymentAmountInCents>
<px:LimitToNumberOfPayments>4</px:LimitToNumberOfPayments>
<px:LimitToTotalAmountInCents>0</px:LimitToTotalAmountInCents>
<px:KeepManualPayments>NO</px:KeepManualPayments>
<px:Username>WebServiceUser</px:Username>
</px:CreateSchedule>
</soapenv:Body>
</soapenv:Envelope>'; // data from the form, e.g. some ID number
$headers = array(
"Content-type: text/xml;charset="utf-8"",
"Accept: text/xml",
"Cache-Control: no-cache",
"Pragma: no-cache",
"SOAPAction: https://api.demo.ezidebit.com.au/v3-5/nonpci",
"Content-length: ".strlen($xml_post_string),
); //SOAPAction: your op URL
$url = "https://api.demo.ezidebit.com.au/v3-5/nonpci";
// PHP cURL for https connection with auth
$soap_do = curl_init();
curl_setopt($soap_do, CURLOPT_URL, $url );
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, $xml_post_string);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, $headers);
$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);
// converting
$response1 = str_replace("<soap:Body>","",$content);
$response2 = str_replace("</soap:Body>","",$response1);
// convertingc to XML
$parser = simplexml_load_string($response2);
// user $parser to get your data out of XML response and to display it.
扩展穆罕默德的评论,建议他已经解决了与肥皂动作URL http标头值有关的问题,这是我搜索的根本原因,发现Ezidebit EditCustomerDetails不起作用,这表明SoapAction应该看起来像https://px.ezidebit.com.au/INonPCIService/EditCustomerDetails
我发现通过查看 https://api.demo.ezidebit.com.au/v3-5/nonpci?wsdl 我能够构造正确的soapActionURL值,在createSchedule的情况下,该值看起来很https://px.ezidebit.com.au/INonPCIService/CreateSchedule
我在Ezidebit 的集成服务团队工作,这听起来确实像是一个与TLS相关的问题。
您能否确认您的版本OpenSSL是否支持TLS1.2? 错误消息可能表示您未使用正确的安全协议进行连接。 有关 Ezidebit 有关 SSL 更改的更多信息,请参阅此链接 https://www.ezidebit.com/en-au/ssl-infrastructure,否则我们乐于助人的集成服务团队可以通过提出服务请求 https://ezidebit.secure.force.com/online/contactus?country=au 来进一步协助您的集成
问候
乔治