Merhaba,
Aşağıda wsdl2php (http://www.urdalen.no/wsdl2php/) ile yaratmış
olduğum bir SOAP kütüphanesi mevcut. Bu kütüphaneyi nasıl kullancağım
hakkında en ufak bir fikrim yok. Bu konuda bana yardımcı olabilecek
bir arkadaşımız mevcut mu?
Saygılar.
<?php
class startMobilePax {
  public $merchantid; // int
  public $username; // string
  public $password; // string
  public $gsmno; // string
  public $paymenttype; // int
  public $chargingunit; // string
  public $chargingvalue; // double
  public $productDescription; // string
}

class startMobilePaxResponse {
  public $startMobilePaxResult; // MobilePaxReturn
}

class MobilePaxReturn {
  public $status; // string
  public $errcode; // string
  public $transactionid; // string
}

class mobilepax extends SoapClient {

  private static $classmap = array(
                                    'startMobilePax' => 'startMobilePax',
                                    'startMobilePaxResponse' =>
'startMobilePaxResponse',
                                    'MobilePaxReturn' => 'MobilePaxReturn',
                                   );

  public function mobilepax($wsdl =
"http://api.mobilepax.com/mobilepax.asmx?wsdl";, $options = array()) {
    foreach(self::$classmap as $key => $value) {
      if(!isset($options['classmap'][$key])) {
        $options['classmap'][$key] = $value;
      }
    }
    parent::__construct($wsdl, $options);
  }

  public function startMobilePax(startMobilePax $parameters) {
    return $this->__soapCall('startMobilePax', array($parameters),       array(
            'uri' => 'http://mobilepax.com/',
            'soapaction' => ''
           )
      );
  }

}

?>

Ben, bunu kullanamadığım için webde bulduğum bir kaç örnek ile hareket
ederek aşağıdaki şekilde bir şey yaptım ancak onda da maalesef
başarılı olamadım. Şifreler test amacıyla şirket tarafıından
verilmiştir. Bununla beraber gelen bir asp kullanım örneği mevcut
ondan da maalesef hiç bir şey anlamadım. Yardımlarınızı bekliyorum.
<?php
$client = new SoapClient("http://api.mobilepax.com/mobilepax.asmx?wsdl";);

$sample_add =  array(
                "merchantid" => 1,
                "username" => mobiltim,
                "password" => mobiltim1000,
                "gsmno" => 5321234567,
                "paymenttype" => TL,
                "chargingunit" => TL,
                "chargingvalue" => 0.1,
                "productDescription" => Urun25,
        );

$odemedurum = $client->startMobilePax->$sample_add;

if ($odemedurum =='11'){
                echo 'Web servisine boş alan gönderilemez';
                }
                else if ($odemedurum =='12'){
                    echo 'Hatalı merchantid, username veya password';
                }
                else if ($odemedurum =='13'){
                    echo 'Charging value bir seferde izin verilen değerden 
fazla';
                }
                else if ($odemedurum =='14'){
                    echo 'HproductDescription 50 karakterden büyük';
                }
                else if ($odemedurum =='15'){
                    echo 'chargingunit SMS veya TL girilebilir';
                }
                else if ($odemedurum =='99'){
                    echo 'sistem hatası. Tanımlanamayan hata';
                }
                else {

                }
?>
_______________________________________________
Linux-programlama mailing list
[email protected]
https://liste.linux.org.tr/mailman/listinfo/linux-programlama
Liste kurallari: http://liste.linux.org.tr/kurallar.php

Cevap