function SOAPTxn($txn_type, $card_number, $expy_dt, $mag_data, $name, $amt, $invoice, $pnref, $zip, $street, $cvnum, $ext_data)
 {
     $this->base = 'https://gatewaystage.itstgate.com/smartPayments/transact.asmx?WSDL';
     $this->userid = 'USERID';
     $this->password = '******';
     $this->postdata = array('UserName' => $this->userid, 'Password' => $this->password, 'TransType' => $txn_type, 'CardNum' => $card_number, 'ExpDate' => $expy_dt, 'MagData' => $mag_data, 'NameOnCard' => $name, 'Amount' => $amt, 'InvNum' => $invoice, 'PNRef' => $pnref, 'Zip' => $zip, 'Street' => $street, 'CVNum' => $cvnum, 'ExtData' => $ext_data);
     /*  set up parameters to send txn to cynergydata */
     $client = new SOAPClient($this->base, array('connection_timeout' => 60));
     /*  now POST the txn  */
     $result = $client->ProcessCreditCard($this->postdata);
     return $result;
 }
Ejemplo n.º 2
0
 /**
  *
  * @param <type> $wsdl
  * @param <type> $options
  */
 public function __construct($wsdl, $options = array())
 {
     if (array_key_exists('curl', $options)) {
         $this->curlOptions = $options['curl'];
         unset($options['curl']);
     }
     parent::__construct($wsdl, $options);
 }
Ejemplo n.º 3
0
 public function hacer_recomendacion($recom, $usuario)
 {
     for ($i = 0; $i < count($recom); $i++) {
         for ($r = 0; $r < count($recom[$i]); $r++) {
             $p[$i]['idOA'] = $recom[$i][$r]['idlom'];
             $p[$i]['idRepository'] = $recom[$i][$r]['idrepository'];
         }
     }
     $parametros = array('idUsuarioActivo' => $usuario, 'OAs' => $p);
     $wsdl_url = 'http://localhost:6020/ServicioWeb?wsdl';
     //  $wsdl_url = 'http://froac.manizales.unal.edu.co:6020/ServicioWeb';
     $client = new SOAPClient($wsdl_url);
     $result = $client->adaptarOAs($parametros);
     $cadena = "";
     $otro = "";
     foreach ($result as $paulis) {
         foreach ($paulis as $no) {
             $cadena = $cadena . $no->idOA . "-" . $no->idRepository . "\$";
         }
     }
     //$this->llenar_recomendacion($p,$supone);
     //        $this->llenar_recomendacion($result);
     return $cadena;
 }
Ejemplo n.º 4
0
<?php

ini_set("soap.sdl_cache_enabled", "0");
$client = new SOAPClient('http://glengemann.io/arrayAssoComplexType/server.php?wsdl');
try {
    var_dump($client->__getFunctions());
} catch (Exception $e) {
    print_r($e);
}
try {
    $result = $client->universidad();
    print_r($result);
    print "\n";
} catch (Exception $e) {
    print_r($e);
}
Ejemplo n.º 5
0
 /**
  * @param  string $wsdlFile
  * @param  string $originalClassName
  * @param  array  $methods
  * @return array
  */
 public static function generateClassFromWsdl($wsdlFile, $originalClassName, array $methods = array())
 {
     if (self::$soapLoaded === NULL) {
         self::$soapLoaded = extension_loaded('soap');
     }
     if (self::$soapLoaded) {
         $client = new SOAPClient($wsdlFile);
         $_methods = array_unique($client->__getFunctions());
         unset($client);
         $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR;
         $methodTemplate = new Text_Template($templateDir . 'wsdl_method.tpl');
         $methodsBuffer = '';
         foreach ($_methods as $method) {
             $nameStart = strpos($method, ' ') + 1;
             $nameEnd = strpos($method, '(');
             $name = substr($method, $nameStart, $nameEnd - $nameStart);
             if (empty($methods) || in_array($name, $methods)) {
                 $args = explode(',', substr($method, $nameEnd + 1, strpos($method, ')') - $nameEnd - 1));
                 $numArgs = count($args);
                 for ($i = 0; $i < $numArgs; $i++) {
                     $args[$i] = substr($args[$i], strpos($args[$i], '$'));
                 }
                 $methodTemplate->setVar(array('method_name' => $name, 'arguments' => join(', ', $args)));
                 $methodsBuffer .= $methodTemplate->render();
             }
         }
         $classTemplate = new Text_Template($templateDir . 'wsdl_class.tpl');
         $classTemplate->setVar(array('class_name' => $originalClassName, 'wsdl' => $wsdlFile, 'methods' => $methodsBuffer));
         return $classTemplate->render();
     } else {
         throw new PHPUnit_Framework_Exception('The SOAP extension is required to generate a mock object ' . 'from WSDL.');
     }
 }
Ejemplo n.º 6
0
<?php

$n_AgentKey = "agentkey";
$n_ApiKey = "ApiKey_CP00284";
$n_SaltKey = "CP002848e6be";
$n_AesKey = "1978llym9TseRHvVb1zkvrALi98OasGTppR+5BvQuow=";
$n_AesKeyIV = "1oLpvkxlirMbncMp8bAvBw==";
$n_ShaKey = "1978llym9TseRHvVb1zkvrALi98OasGTppR+5BvQuow=";
$client = new SOAPClient('http://vm-pp-wf2.shp.tw1.yahoo.net/WebService/CommonWebService.asmx?wsdl');
$return = $client->GetCurrentTimeStamp();
$n_TimeStamp = $return->GetCurrentTimeStampResult;
switch ($_POST['mode']) {
    case "AddEmpAccount":
        //新增員工帳號
        $add_EmployeeId = $_POST['add_EmployeeId'];
        //工號
        $add_Name = $_POST['add_Name'];
        //員工姓名
        $add_Birthday = $_POST['add_Birthday'];
        //生日
        $add_Email = $_POST['add_Email'];
        //Email
        $add_Phone = $_POST['add_Phone'];
        //電話
        $add_LastFiveNumberOfId = $_POST['add_LastFiveNumberOfId'];
        //身分證末五碼
        $n_xml = '<?xml version="1.0" encoding="utf-8"?><AddingEmployeeRequest><Employees><Employee><EmployeeId>' . $add_EmployeeId . '</EmployeeId><Name>' . $add_Name . '</Name><Birthday>' . $add_Birthday . '</Birthday><Email>' . $add_Email . '</Email><Phone>' . $add_Phone . '</Phone><LastFiveNumberOfId>' . $add_LastFiveNumberOfId . '</LastFiveNumberOfId></Employee></Employees></AddingEmployeeRequest>';
        break;
    case "DepartEmployee":
        //離職員工
        $depart_EmployeeId = $_POST['depart_EmployeeId'];
Ejemplo n.º 7
0
<?php

/*
** клиент работы с БД книги
*/
header('Content-type: text/plain; charset=utf-8');
ini_set("soap_wsdl_cache_enabled", "0");
$client = new SOAPClient('bookservice.wsdl');
//print_r($client->__getFunctions());
$result = $client->getCategories();
var_dump($result);
Ejemplo n.º 8
0
 function __construct($licenceKey)
 {
     $this->licenceKey = $licenceKey;
     parent::__construct('GoogleSearch.wsdl');
 }
Ejemplo n.º 9
0
<?php

$client = new SOAPClient(dirname(__FILE__) . '/bug28985.wsdl', array('trace' => 1));
var_dump($client->__getTypes());
Ejemplo n.º 10
0
 public function call($configuration)
 {
     return parent::__soapCall($configuration[0], $configuration[1]);
 }
Ejemplo n.º 11
0
<?php

$client = new SOAPClient(null, array('location' => 'http://localhost', 'uri' => 'myNS', 'exceptions' => false, 'trace' => true));
$header = new SOAPHeader(null, 'foo', 'bar');
$response = $client->__call('function', array(), null, $header);
print $client->__getLastRequest();