当前位置: 首页>>代码示例>>PHP>>正文


PHP nusoap_client类代码示例

本文整理汇总了PHP中nusoap_client的典型用法代码示例。如果您正苦于以下问题:PHP nusoap_client类的具体用法?PHP nusoap_client怎么用?PHP nusoap_client使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了nusoap_client类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendSoapRequest

 public function sendSoapRequest($message)
 {
     $client = new nusoap_client(HOTEL_ENDPOINT, false);
     $client->setCredentials(USERNAME, PASSWORD);
     $result = $client->send($message, HOTEL_ENDPOINT);
     return json_encode($result);
 }
开发者ID:venkatpapana,项目名称:vtravel,代码行数:7,代码来源:TravelportAPI.php

示例2: getStatus

function getStatus($refid)
{
    ini_set("soap.wsdl_cache_enabled", "0");
    //$mkey = '465A86C858B0293DD478D3D664E4B0CB18BC18C0332215CCF7D7C891CA25C3FAA4F5FC7CB187BFDA7233A720A747FB9FDEC866EB8D20D7C262287716F11C48A5';
    $mkey = 'CF82609ADB4A2352966649823625C1217BE486E1B23D4686621EFED077B0B42924B2098F0B36656BAC8B6008576BF05A254B244675B501DA3DF863311BF1BB75';
    $t_ref = $refid;
    //$t_ref = '12345678';
    //$p_id = '3996';
    $p_id = '3944';
    $hasval = $p_id . $t_ref . $mkey;
    $myHASH = hash("sha512", $hasval);
    $wsdlfile = "https://webpay.interswitchng.com/paydirect/services/webpayservice.svc?wsdl";
    $msg = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.interswitchng.com/" xmlns:web="http://schemas.datacontract.org/2004/07/WebPAY.Core.ServiceFramework.Contract"> <soapenv:Header/> <soapenv:Body> <ser:GetTransactionData> <ser:transactionQueryRequest> <web:Hash>' . $myHASH . '</web:Hash> <web:ProductId>' . $p_id . '</web:ProductId> <web:TransactionReference>' . $t_ref . '</web:TransactionReference> </ser:transactionQueryRequest> </ser:GetTransactionData> </soapenv:Body> </soapenv:Envelope>';
    //$s = new nusoap_client($wsdlfile);
    $s = new nusoap_client($wsdlfile, true);
    //$result = $s->call('GetTransactionData', $msg ,'http://services.interswitchng.com/','http://services.interswitchng.com/WebPayService/GetTransactionData');
    $do = $s->send($msg, 'http://services.interswitchng.com/WebPayService/GetTransactionData');
    $result = $s->responseData;
    $err = $s->getError();
    if ($err) {
        // Display the error
        echo '<h2>Network Timeout! </h2><pre></pre><b>Ooopsy! Kindly hit the button below and hit <b>accept/send/yes</b>  on all prompt request.</b><br /><br /><input type="button" value="Please Click here" onClick="document.location.reload(true);">';
    } else {
    }
    return $result;
}
开发者ID:Ghaji,项目名称:form_application,代码行数:26,代码来源:webservice.php

示例3: remote_action

function remote_action($method, $parameters)
{
    global $endpoint;
    // specify the SOAP endpoint
    global $wsdl;
    // WSDL file if required
    global $debug;
    // enable debug dump
    $client = new nusoap_client($wsdl, true);
    $result = $client->call($method, $parameters);
    /*
    // TODO error handling
    // Check for a fault - this works with the PHP SoapClient
    if ($client->fault) {
        echo '<p><b>Fault: ';
        print_r($result);
        echo '</b></p>';
    } else {
        // Check for errors
         $err = $client->getError();
        if ($err) {
        		// Display the error
        		echo '<p><b>Error: ' . $err . '</b></p>';
        } else {
        		// Display the result
        		print_r($result);
        }
    }
    */
    return $result;
}
开发者ID:sportsbook-software,项目名称:sportsbook-software-soap-api,代码行数:31,代码来源:sample.php

示例4: call

    /**
     * Executes a request
     * @param type $method
     * @param type $params k,v pairs where v's are raw(not url encoded)
     */
    public function call($method, $params = array())
    {
        $params = is_array($params) ? $params : array();
        $methods = array('Transaction24HourReportByInvoiceReference' => array('ewayCustomerInvoiceRef' => ''));
        $req = new nusoap_client($this->gateway, TRUE);
        $headers = <<<head
        <eWAYHeader xmlns="https://www.eway.com.au/gateway/services/TransactionReportService.asmx/">
            <eWAYCustomerID>{$this->eway_customer_id}</eWAYCustomerID>
            <UserName>{$this->eway_username}</UserName>
            <Password>{$this->eway_password}</Password>
        </eWAYHeader>
head;
        $req->setHeaders($headers);
        if (!isset($methods[$method])) {
            throw new Exception("This method is not yet implemented");
        }
        $params = array_merge($methods[$method], $params);
        $tmp = "";
        foreach ($params as $k => $v) {
            $tmp .= sprintf('<%s>%s</%s>', $k, $v, $k);
        }
        $body = <<<body
        <{$method}  xmlns="https://www.eway.com.au/gateway/services/TransactionReportService.asmx/">
        {$tmp}
        </{$method}>

body;
        $result = $req->call($method, $body);
        //echo '<h2>Request</h2><pre>' . htmlspecialchars($req->request, ENT_QUOTES) . '</pre>';
        //echo '<h2>Response</h2><pre>' . htmlspecialchars($req->response, ENT_QUOTES) . '</pre>';
        return $result;
    }
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:37,代码来源:Eway24WebserviceClient.php

示例5: busca_exemplares

function busca_exemplares($codigo_acervo_temp)
{
    global $protocolo, $server;
    $client = new nusoap_client("{$protocolo}://{$server}/web_service/servidor_ws.php?wsdl");
    $result = $client->call('busca_exemplares', array('codigo_acervo_temp' => $codigo_acervo_temp));
    return $result;
}
开发者ID:VicenteTerra,项目名称:validarec,代码行数:7,代码来源:cliente_ws.php

示例6: call

    /**
     * Executes a request
     * @param type $method
     * @param type $params k,v pairs where v's are raw(not url encoded)
     */
    public function call($method, $params = array())
    {
        $params = is_array($params) ? $params : array();
        $methods = array('CreateRebillCustomer' => array('customerTitle' => '', 'customerFirstName' => '', 'customerLastName' => '', 'customerAddress' => '', 'customerSuburb' => '', 'customerState' => '', 'customerCompany' => '', 'customerPostCode' => '', 'customerCountry' => '', 'customerEmail' => '', 'customerFax' => '', 'customerPhone1' => '', 'customerPhone2' => '', 'customerRef' => '', 'customerJobDesc' => '', 'customerComments' => '', 'customerURL' => ''), 'CreateRebillEvent' => array('RebillCustomerID' => '', 'RebillInvRef' => '', 'RebillInvDes' => '', 'RebillCCName' => '', 'RebillCCNumber' => '', 'RebillCCExpMonth' => '', 'RebillCCExpYear' => '', 'RebillInitAmt' => '', 'RebillInitDate' => '', 'RebillRecurAmt' => '', 'RebillStartDate' => '', 'RebillInterval' => '', 'RebillIntervalType' => '', 'RebillEndDate' => ''), 'QueryTransactions' => array('RebillCustomerID' => '', 'RebillID' => ''), 'DeleteRebillEvent' => array('RebillCustomerID' => '', 'RebillID' => ''), 'DeleteRebillCustomer' => array('RebillCustomerID' => ''), 'Transaction24HourReportByInvoiceReference' => array('ewayCustomerInvoiceRef' => ''));
        $req = new nusoap_client($this->gateway, TRUE);
        $headers = <<<head
\t\t<eWAYHeader xmlns="http://www.eway.com.au/gateway/rebill/manageRebill">
\t\t\t<eWAYCustomerID>{$this->eway_customer_id}</eWAYCustomerID>
\t\t\t\t<Username>{$this->eway_username}</Username>
\t\t\t\t<Password>{$this->eway_password}</Password>
\t\t</eWAYHeader>
head;
        $req->setHeaders($headers);
        if (!isset($methods[$method])) {
            throw new Exception("This method is not yet implemented");
        }
        $params = array_merge($methods[$method], $params);
        $tmp = "";
        foreach ($params as $k => $v) {
            $tmp .= sprintf('<%s>%s</%s>', $k, $v, $k);
        }
        $body = <<<body
\t\t<{$method} xmlns="http://www.eway.com.au/gateway/rebill/manageRebill">
\t\t{$tmp}
\t\t</{$method}>


body;
        $result = $req->call($method, $body);
        return $result;
    }
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:36,代码来源:EwayRecurWebserviceClient.php

示例7: _soapcall

 private function _soapcall($call, $params)
 {
     require_once dirname(__FILE__) . '/lib/nusoap.php';
     $soapclient = new nusoap_client('https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx?WSDL', 'wsdl');
     $result = $soapclient->call($call, array('parameters' => $params));
     /* Debug */
     //echo '<h2>Request</h2><pre>' . htmlspecialchars($soapclient->request, ENT_QUOTES) . '</pre>';
     //echo '<h2>Response</h2><pre>' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '</pre>';
     //echo '<h2>Debug</h2><pre>' . htmlspecialchars($soapclient->debug_str, ENT_QUOTES) . '</pre>';
     //echo '<pre>'; print_r($result); echo '</pre>';
     // Check for a fault
     if ($soapclient->fault) {
         echo '<div class="alert error"><h2>Fault</h2><pre>';
         print_r($result);
         echo '</pre></div>';
     } else {
         // Check for errors
         $err = $soapclient->getError();
         if ($err) {
             // Display the error
             echo '<div class="alert error"><h2>Error</h2><pre>' . $err . '</pre></div>';
         } else {
             return $result;
         }
     }
     return false;
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-payment-epaydk,代码行数:27,代码来源:epaysoap.php

示例8: callbackGateway

 public function callbackGateway()
 {
     global $db, $get;
     $Status = $_POST['status'];
     $Refnumber = $_POST['refnumber'];
     $Resnumber = $_POST['resnumber'];
     if ($Status == 100) {
         $ParspalPin = trim($this->merchant);
         $pass = $this->pass;
         $payment = Cshop::app()->getDb()->prepare(QueryBuilder::getInstance()->select()->from('payment')->where('reference = ?'));
         $payment->execute(array($Resnumber));
         $payment = $payment->fetch();
         $amount = round($payment['amount'] / 10);
         $soapclient = new nusoap_client('http://merchant.parspal.com/WebService.asmx?wsdl', 'wsdl');
         $params = array('MerchantID' => $ParspalPin, 'Password' => $pass, 'Price' => $amount, 'RefNum' => $Refnumber);
         $res = $soapclient->call('verifyPayment', $params);
         $Status = $res['verifyPaymentResult']['ResultStatus'];
         if (strtolower($Status) == 'success') {
             return $payment;
         } else {
             $message = 'پرداخت ناموفق است. خطا';
         }
     } else {
         $message = 'پرداخت ناموفق است. خطا';
     }
     throw new Exception($message);
 }
开发者ID:aliazizi,项目名称:CShop,代码行数:27,代码来源:Parspal.php

示例9: _call

 private function _call($function_name, $inputs)
 {
     $params = array('merchant_site_code' => $this->merchantSiteCode, 'checksum' => $this->_makeChecksum($inputs), 'params' => '<params>' . $this->_convertArrayToXML($inputs) . '</params>');
     $client = new nusoap_client($this->urlWS, true);
     $result = $client->call($function_name, $params);
     return $result;
 }
开发者ID:nguyenquangkhai,项目名称:riseabove,代码行数:7,代码来源:nganluong.microcheckout.class.php

示例10: callbackGateway

 public function callbackGateway()
 {
     $merchantID = $this->merchantID;
     $au = preg_replace('/[^a-z0-9]/', '', $_GET['au']);
     $ref_id = $_GET['order_id'];
     if (strlen($au) > 4) {
         $payment = Cshop::app()->getDb()->prepare(QueryBuilder::getInstance()->select()->from('payment')->where('id = ?'));
         $payment->execute(array($au));
         $payment = $payment->fetch();
         $amount = round($payment['amount'] / 10);
         $client = new nusoap_client('https://www.sibapal.com/payment/wsdl?wsdl', 'wsdl');
         $res = $client->call("verify", array($merchantID, $amount, $au));
         if ($payment['status'] == Application::STATUS_PENDING) {
             if (!empty($res) and $res == 1) {
                 return $payment;
             } else {
                 $message = 'پرداخت توسط سیباپال انجام نشده است .';
             }
         } else {
             $message = 'سفارش قبلا پرداخت شده است.';
         }
     } else {
         $message = 'شماره یکتا اشتباه است.';
     }
     throw new Exception($message);
 }
开发者ID:aliazizi,项目名称:CShop,代码行数:26,代码来源:Sibapal.php

示例11: login

 function login()
 {
     $client = new nusoap_client('http://portalsi.pp3.co.id/wsouth.asmx?wsdl', true);
     $result = $client->call('valLoginAkun', array('xIDAPLIKASI' => 79, 'xUsername' => $this->input->post('username'), 'xPassword' => $this->input->post('password')));
     //print_r($result);
     if ($result['valLoginAkunResult']['responType'] == 'E-017' || $result['valLoginAkunResult']['responType'] == 'E-018' || $result['valLoginAkunResult']['responType'] == 'E-003') {
         redirect($result['valLoginAkunResult']['URL_CP'], 'refresh');
     } elseif (substr($result['valLoginAkunResult']['responType'], 0, 1) == 'S') {
         $this->session->set_userdata('login', 'true');
         $this->session->set_userdata('username', $this->input->post('username'));
         $this->session->set_userdata('password', $this->input->post('password'));
         if ($result['valLoginAkunResult']['HAKAKSES'] == 803) {
             //ADMIN
             $GroupAkses = 01;
         } elseif ($result['valLoginAkunResult']['HAKAKSES'] == 802) {
             //USER
             $GroupAkses = 02;
         }
         $this->session->set_userdata('level_user', $GroupAkses);
         $this->session->set_userdata('nama_group', $result['valLoginAkunResult']['HAKAKSES_DESC']);
         $this->session->set_userdata('nama_user', $result['valLoginAkunResult']['NAMA']);
         $this->session->set_userdata('cabang', $result['valLoginAkunResult']['NAMA_CABANG']);
         $this->session->set_userdata('id_cabang', $result['valLoginAkunResult']['KD_CABANG']);
         $this->session->set_userdata('IDUSER', $result['valLoginAkunResult']['IDUSER']);
         $this->session->set_userdata('HP', $result['valLoginAkunResult']['HP']);
         $this->session->set_userdata('EMAIL', $result['valLoginAkunResult']['EMAIL']);
         redirect('dash');
     } else {
         $this->index();
     }
 }
开发者ID:erikhard,项目名称:egratifikasi,代码行数:31,代码来源:home.php

示例12: testConnection

 /**
  * Test connection with values of soap auth administration settings
  */
 public static function testConnection($a_ext_uid, $a_soap_pw, $a_new_user)
 {
     global $ilSetting;
     $settings = $ilSetting->getAll();
     $server_hostname = $settings["soap_auth_server"];
     $server_port = (int) $settings["soap_auth_port"];
     $server_uri = $settings["soap_auth_uri"];
     $namespace = $settings["soap_auth_namespace"];
     $use_dotnet = $settings["soap_auth_use_dotnet"];
     if ($settings["soap_auth_use_https"]) {
         $uri = "https://";
     } else {
         $uri = "http://";
     }
     $uri .= $server_hostname;
     if ($server_port > 0) {
         $uri .= ":" . $server_port;
     }
     if ($server_uri != "") {
         $uri .= "/" . $server_uri;
     }
     $soap_client = new nusoap_client($uri);
     if ($err = $soap_client->getError()) {
         return "SOAP Authentication Initialisation Error: " . $err;
     }
     $soapAction = "";
     $nspref = "";
     if ($use_dotnet) {
         $soapAction = $namespace . "/isValidSession";
         $nspref = "ns1:";
     }
     $valid = $soap_client->call('isValidSession', array($nspref . 'ext_uid' => $a_ext_uid, $nspref . 'soap_pw' => $a_soap_pw, $nspref . 'new_user' => $a_new_user), $namespace, $soapAction);
     return "<br>== Request ==" . '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->request)), ENT_QUOTES) . '</pre><br>' . "<br>== Response ==" . "<br>Valid: -" . $valid["valid"] . "-" . '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->response)), ENT_QUOTES) . '</pre>';
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:37,代码来源:class.ilSOAPAuth.php

示例13: callbackGateway

 public function callbackGateway()
 {
     $au = $_GET['au'];
     $ref_id = $_GET['order_id'];
     if (strlen($au) > 4) {
         $payment = Cshop::app()->getDb()->prepare(QueryBuilder::getInstance()->select()->from('payment')->where('reference = ?'));
         $payment->execute(array($au));
         $payment = $payment->fetch();
         $merchantID = $this->merchant;
         $amount = round($payment['amount'] / 10);
         $client = new nusoap_client('http://jahanpay.com/webservice?wsdl', 'wsdl');
         $res = $client->call("verification", array($merchantID, $amount, $au));
         if ($payment['status'] == Application::STATUS_PENDING) {
             if (!empty($res) and $res == 1) {
                 return $payment;
             } else {
                 $message = 'پرداخت توسط جهان پی انجام نشده است .';
             }
         } else {
             $message = 'سفارش قبلا پرداخت شده است.';
         }
     } else {
         $message = 'شماره یکتا اشتباه است.';
     }
     throw new Exception($message);
 }
开发者ID:aliazizi,项目名称:CShop,代码行数:26,代码来源:Jahanpay.php

示例14: verify

 public function verify($Amount, $typ)
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . '/assets/lib/nusoap.php';
     $MerchantID = $this->MerchantID;
     $Authority = $_GET['Authority'];
     if ($_GET['Status'] == 'OK') {
         // URL also Can be https://ir.zarinpal.com/pg/services/WebGate/wsdl
         $client = new nusoap_client('https://de.zarinpal.com/pg/services/WebGate/wsdl', 'wsdl');
         $client->soap_defencoding = 'UTF-8';
         $result = $client->call('PaymentVerification', array(array('MerchantID' => $MerchantID, 'Authority' => $Authority, 'Amount' => $Amount)));
         if ($result['Status'] == 100) {
             $msg = 'پرداخت شما با موفقیت انجام شد .کد پرداخت  : ' . $result['RefID'] . '<br>';
             switch ($typ) {
                 case 'kharid_file':
                     $msg .= 'آدرس لینک دانلود فایل مورد نظر به ایمیل شما ارسال شده است';
                     break;
                 case 'advert_register':
                     $msg .= '<br>آگهی شما پس ار تایید در سایت نمایش داده خواهد شد.';
                     break;
             }
             return array('bank_id' => 1, 'status' => '100', 'Authority' => $Authority, 'RefID' => $result['RefID'], 'msg' => $msg);
             return 'Transation success. RefID:' . $result['RefID'];
         } else {
             $msg = 'متاسفانه درحین پرداخت خطایی رخ داده است.<br>';
             return array('bank_id' => 1, 'status' => $result['Status'], 'Authority' => $Authority, 'RefID' => '', 'msg' => $msg);
             return 'Transation failed. Status:' . $result['Status'];
         }
     } else {
         $msg = 'متاسفانه درحین پرداخت خطایی رخ داده است.<br>';
         return array('bank_id' => 1, 'status' => 'NOK', 'Authority' => $Authority, 'RefID' => '', 'msg' => $msg);
         return 'Transaction canceled by user';
     }
     return '<hr>Payment :: ' . $_SESSION['pay'];
 }
开发者ID:jnaroogheh,项目名称:darvishi,代码行数:34,代码来源:Zarin_pal.php

示例15: GetCredit

 public function GetCredit()
 {
     $client = new nusoap_client($this->wsdl_link, 'wsdl');
     $client->decodeUTF8(false);
     $result = $client->call('accountInfo', array('username' => $this->username, 'password' => $this->password));
     return (int) $result['balance'];
 }
开发者ID:jekv,项目名称:devia,代码行数:7,代码来源:smsservice.class.php


注:本文中的nusoap_client类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。