<?php
/**
 * Created by PhpStorm.
 * User: Özgür
 * Date: 25.11.2015
 * Time: 12:58
 * TP_Islem_Sorgulama
 */
class TP_Islem_Sorgulama{
    function TP_Islem_Sorgulama($guid,$dekont,$siparis,$islem)
    {
        $this->GUID = $guid;
        $this->Dekont_ID= $dekont;
        $this->Siparis_ID = $siparis;
        $this->Islem_ID = $islem;
        $this->G = new G(10738, "test" , "test");
    }
}
class G {
    function G($cc,$cu,$cp)
    {
        $this->CLIENT_CODE = $cc;
        $this->CLIENT_USERNAME = $cu;
        $this->CLIENT_PASSWORD = $cp;
    }
}
if($_POST):
    /* Initialize webservice with your WSDL */
    $client = new SoapClient("https://dmzws.ew.com.tr/turkpos.ws/service_turkpos_test.asmx?wsdl");
    /* Fill your Contact Object */
    $nesne = new TP_Islem_Sorgulama($_POST['guid'],$_POST['dekont'],$_POST['siparis'],$_POST['islem']);
    $response = $client->TP_Islem_Sorgulama($nesne);
    var_dump($response);
endif;
?>
<style>
    .clearfx {
        clear: both;
    }
    .body {
        margin: 0 auto;
        padding: 50px 100px;
    }
    .center-align {
        text-align: center;
        margin: 0 auto;
    }
    .divbox {
        display: inline-block;
    }
    .text-input {
        width: 50%;
    }
    .submit-class {
        width="70%";
        height="30px";
    }
</style>
<form action="islemsorgu.php" method="post" enctype="multipart/form-data" >
    <section role="form" class="section-form">
        <legend class="center-align">
            <h3>TP_Islem_Sorgulama Metodu</h3>
        </legend>
        <hr />
        <div class="center-align">
            <label for="">Üye İşyerine ait Anahtar:</label>
            <input type="text" class="text-input" name="guid" />
        </div>
        <hr />
        <div class="center-align">
            <label for="">Dekont:</label>
            <input type="text" class="text-input" name="dekont" />
        </div>
        <hr />
        <div class="center-align">
            <label for="">Sipariş:</label>
            <input type="text" class="text-input" name="siparis" />
        </div>
        <hr />
        <div class="center-align">
            <label for="">İşlem:</label>
            <input type="text" class="text-input" name="islem" />
        </div>
        <div class="clearfx"></div>
        <hr />
        <div class="center-align">
            <input class="Submit" type="submit" name="submit" id="submit" class="submit-class" value="İşlem Sorgula" />
        </div>
    </section>
    <div class="clearfx"></div>
</form>
