本文整理汇总了PHP中nusoap_client::call方法的典型用法代码示例。如果您正苦于以下问题:PHP nusoap_client::call方法的具体用法?PHP nusoap_client::call怎么用?PHP nusoap_client::call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nusoap_client
的用法示例。
在下文中一共展示了nusoap_client::call方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
/**
* 建立nusoap client
*
*/
private function create()
{
//登录服务
if (!$this->authservice) {
$this->authservice = new nusoap_client("http://125.88.6.191/DexExchange/UserService.asmx?WSDL", true);
$this->authservice->soap_defencoding = 'utf-8';
$this->authservice->decode_utf8 = false;
}
//生成ticket
$result = $this->authservice->call("Login", array('authId' => $this->auth, 'authPassword' => $this->authpass), '', '');
if (C("DEBUG_MODE")) {
$this->addLog("czLogin result:" . $result);
}
if (!$result) {
return false;
}
if (!$result["LoginResult"]) {
return false;
}
$this->ticket = $result["LoginResult"];
//制单服务
if (!$this->awbservice) {
$this->awbservice = new nusoap_client("http://58.248.41.191:8080/MetaData/Awb?wsdl", true);
$this->awbservice->soap_defencoding = 'utf-8';
$this->awbservice->decode_utf8 = false;
$header = "<DexHeader xmlns=\"http://tang.csair.com/dex/\"><dexlocation>Awb</dexlocation><dextoken>{$this->ticket}</dextoken></DexHeader>";
$this->awbservice->setHeaders($header);
}
}
示例2: getData
function getData($token)
{
include_once '../connections.php';
$wsdl = "http://localhost:3434/genevieve/ws/services.php?wsdl";
//create client object
$client = new nusoap_client($wsdl, 'wsdl');
$favorite = $client->call('getFavorite', array('token' => $token));
$favoriteSong = $favorite[0]['item'][0];
$favoriteArtist = $favorite[0]['item'][1];
$estatistica = $client->call('calcEstatic', array('favoriteSong' => $favoriteSong, 'favoriteArtist' => $favoriteArtist, 'token' => $token));
return $estatistica;
}
示例3: 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);
}
示例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;
}
示例5: _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;
}
示例6: _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;
}
示例7: 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);
}
示例8: 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();
}
}
示例9: 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>';
}
示例10: 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;
}
示例11: 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;
}
示例12: 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);
}
示例13: 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;
}
示例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'];
}
示例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'];
}