Last active
November 11, 2016 07:58
-
-
Save NimzyMaina/37546b81906eb014bad58c9d2c7ac362 to your computer and use it in GitHub Desktop.
GT Bank Web Service Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
$url = 'https://196.200.24.46/Rent/Service1.asmx?wsdl'; | |
// options for ssl in php 5.6.5 | |
$opts = array( | |
'ssl' => array('ciphers'=>'RC4-SHA', 'verify_peer'=>false, 'verify_peer_name'=>false) | |
); | |
// SOAP 1.2 client | |
$params = array ('encoding' => 'UTF-8', 'verifypeer' => false, 'verifyhost' => false, 'soap_version' => SOAP_1_2, 'trace' => 1, 'exceptions' => 1, "connection_timeout" => 180, 'stream_context' => stream_context_create($opts) ); | |
$client = new SoapClient($url, $params); | |
$params = ['Value' => 300]; | |
//echo $response = $client->__soapCall("InsertRecord", array($params)); | |
// echo '<pre>'; | |
// var_dump($client->__getFunctions()); | |
// var_dump($client->__getTypes()); | |
/** | |
* | |
*/ | |
class InsertRecord | |
{ | |
public $Value; | |
function InsertRecord($Value){ | |
$this->Value = $Value; | |
} | |
} | |
$InsertRecord = new InsertRecord(300); | |
$response = $client->__soapCall("InsertRecord", array($InsertRecord)); | |
/* Print webservice response */ | |
var_dump($response); | |
echo '<br>'; | |
echo $response->InsertRecordResult; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment