我在调用Ezidebit SOAP调用时遇到以下错误。
a:ActionNotSupported由于EndpointDispatcher上的ContractFilter不匹配,无法在接收方处理带有Action“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.
答案 0 :(得分:0)
我在Ezidebit的Integration Services团队工作,这听起来像是与TLS相关的问题。
您能否确认OpenSSL版本是否支持TLS1.2?该错误消息可能表示您没有使用正确的安全协议进行连接。有关Ezidebit有关SSL更改的更多信息,请参阅此链接https://www.ezidebit.com/en-au/ssl-infrastructure,否则我们有用的集成服务团队可以通过提出服务请求来帮助您进一步整合https://ezidebit.secure.force.com/online/contactus?country=au
此致
乔治
答案 1 :(得分:0)
扩展Mohammed的评论,他建议他解决了与 soapActionURL http标头值有关的问题,该问题是我搜索并遇到Ezidebit EditCustomerDetails not working的根本原因,这表明SoapAction应该看起来像https://px.ezidebit.com.au/INonPCIService/EditCustomerDetails
我发现通过查看https://api.demo.ezidebit.com.au/v3-5/nonpci?wsdl,我可以构造正确的 soapActionURL 值,在 createSchedule 的情况下,该值应该是{{1} }