我試圖從eway(澳大利亞)實施反覆出現的web服務。我怎麼都無法讓它工作。eWay支付網關
我不斷得到messeage
「元素命名空間‘http://www.eway.com.au/gateway/rebill/manageRebill’rebillCustomerCreate具有不完整的內容可能元素的列表預計:‘CustomerRef’。」
這是WSDL:https://www.eway.com.au/gateway/rebill/test/manageRebill_test.asmx?wsdl
我是新來的SOAP。試圖在PHP中實現它。任何人都可以請指出我做錯了什麼?
這是我的PHP代碼:
<?php
$URL = "https://www.eway.com.au/gateway/rebill/test/manageRebill_test.asmx?wsdl";
$option = array("trace"=>true);
$client = new SOAPClient($URL, $option);
$functions = $client->__getFunctions();
$headeroptions =array('eWAYCustomerID'=>"87654321",'Username'=>"[email protected]","Password"=>"test");
$header = new SOAPHeader('http://www.eway.com.au/gateway/rebill/manageRebill', 'eWAYHeader',$headeroptions);
$bodyoptions = array(
"customerTitle" => "Mr",
"customerFirstName" => "firstname",
"customerLastName" => "lastname",
"customerAddress" => "address",
"customerSuburb" => "someniceplace",
"customerState" => "somenicestate",
"customerCompany" => "somecompany",
"customerPostCode" => "411026",
"customerCountry" => "australia",
"customerEmail" => "[email protected]",
"customerFax" => "123456",
"customerPhone1" => "123456",
"customerPhone2" => "123456",
"customerRef" => "abc123",
"customerJobDesc" => "Developer",
"customerComments" => "Make it work",
"customerURL" => "www.nicesite.com"
);
try{
$response = $client->__soapCall("CreateRebillCustomer", $bodyoptions,NULL,$header,$outputHeader);
echo $client->__getLastRequest();
//$response = $client->CreateRebillCustomer($bodyoptions);
var_dump($response);
} catch(SOAPFault $e){
print $e;
}
?>
會不會是所有的c需要像CustomerJobDesc一樣大寫,CustomerRef ect – 2011-05-17 09:26:06
在WSDL中看起來並不像這樣。 – Constantine 2011-05-17 09:28:53