Hello,
I am a PHP programmer, and I have encountered a problem with Debtor_Create() function provided by the API. When I run the code, I
receive the following error:
// error string(54) "SOAP-ERROR: Encoding: object hasn't 'vatZone' property"
I think this has something to do with the array I am creating to enter the person’s data, but I am not sure. Can anyone tell me what
portion of my code is incorrect? Here is my code:
set_time_limit(0);
$wsdlUrl = 'https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL';
$client = new SoapClient($wsdlUrl, array("trace" => 1, "exceptions" => 1));
$client->Connect(array(
'agreementNumber' => 'xxxxxx',
'userName' => 'xxxxxx',
'password' => 'xxxxxx'
)
);
$number = $client->Debtor_GetNextAvailableNumber()->Debtor_GetNextAvailableNumberResult;
try {
$client->Debtor_Create(array(
'Number' => $number,
'VatZone' => 'HomeCountry',
'Name' => 'Homer J. Simpson'
));
} catch (Exception $e) {
var_dump($e->getMessage());
}
Thank you!

