Kabala karaladım, doğruluğuna garanti veremem, servis adresini düzeltip dene, verdiğin bilgilere göre bu şekilde olması lazım.
<?php
/*
* Sinan Turgut
*
* Test usage
* $svc = new anarsamadov();
* $rezult = $svc->Calculate('xx','yy','zz','mm');
* $rezultStatus = $rezult['CalculateStatus'];
* $rezultdiscountPercent = $rezult['discountPercent'];
*
*/
class anarsamadov{
protected $client;
public function __construct() {
$this->client = new SoapClient(
"http://servis.asmx?WSDL",
array(
'trace'=>true,
'encoding'=>'UTF-8'
)
);
}
public function __destruct() {
unset($this->client);
}
public function Calculate($AuthenticationKey, $IdenticalCode, $TerminalCode, $Amount){
try {
$rezult = $this->client->Calculate($AuthenticationKey, $IdenticalCode, $TerminalCode, $Amount);
} catch ( Exception $e ) {
throw new Exception("Unable to send Calculate request: ".$e->getMessage() );
}
$r = (array)$rezult;
$t = (array)$r['CalculateResult'];
return $t;
}
}
?>