本文整理汇总了PHP中soapclient类的典型用法代码示例。如果您正苦于以下问题:PHP soapclient类的具体用法?PHP soapclient怎么用?PHP soapclient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了soapclient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run_transaction
function run_transaction($vars, $method = 'threeDSecureEnrolmentRequest')
{
$client = new soapclient($u = 'https://www.secpay.com/java-bin/services/SECCardService?wsdl', true);
$err = $client->getError();
if ($err) {
return array('message' => sprintf(_PLUG_PAY_SECPAY_ERROR, $err));
}
$result = $client->call($method, $vars, "http://www.secpay.com");
// Check for a fault
if ($client->fault) {
if ($err) {
return array('message' => _PLUG_PAY_SECPAY_ERROR2 . join(' - ', array_values($result)));
}
} else {
// Check for errors
$err = $client->getError();
if ($err) {
return array('message' => sprintf(_PLUG_PAY_SECPAY_ERROR3, $err));
} else {
if ($result[0] == '?') {
$result = substr($result, 1);
}
$ret = $this->reparse($result);
return $ret;
}
}
}
示例2: Mist
function Mist($p)
{
$client = new soapclient(WSDL, array('typemap' => array(array("type_ns" => "uri:mist", "type_name" => "A"))));
try {
$client->Mist(array("XX" => "xx"));
} catch (SoapFault $x) {
}
return array("A" => "ABC", "B" => "sss");
}
示例3: create_soap_client
function create_soap_client()
{
$client = new soapclient('http://siap.ufcspa.edu.br/siap_ws.php?wsdl', true);
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
// At this point, you know the call that follows will fail
}
return $client;
}
示例4: PinPaymentEnquiry
public function PinPaymentEnquiry($authorityCode, $status)
{
// instantiate the SOAP client object
$soap = new soapclient($this->wsdl, "wsdl");
// get the SOAP proxy object, which allows you to call the methods directly
$proxy = $soap->getProxy();
// set parameter parameters (PinPaymentEnquiry^)
$parameters = array(pin => $this->pin, authority => $authorityCode, status => $status);
// get the result, a native PHP type, such as an array or string
$result = $proxy->PinPaymentEnquiry($parameters);
return $result;
}
示例5: Connect
public function Connect()
{
// instantiate wsdl cache manager
if ($this->mDbConfig['db_wsdl_cache_path'] != '' && $this->mDbConfig['db_wsdl_cache_enabled']) {
$wsdl_cache = new wsdlcache($this->mDbConfig['db_wsdl_cache_path'], $this->mDbConfig['db_wsdl_cache_lifetime']);
}
// try to get from cache first...
$wsdl_url = $this->mDbConfig['db_wsdl_url'];
if ($this->mDbConfig['db_namespace']) {
$wsdl_url_query = parse_url($wsdl_url, PHP_URL_QUERY);
if (!$wsdl_url_query) {
$wsdl_url .= '?nspace=' . $this->mDbConfig['db_namespace'];
} else {
$wsdl_url .= '&nspace=' . $this->mDbConfig['db_namespace'];
}
}
if ($wsdl_cache) {
$wsdl = $wsdl_cache->get($wsdl_url);
}
// cache hit? if not, get it from server and put to cache
if (!$wsdl) {
SysLog::Log('Cache MISSED: ' . $wsdl_url, 'SoapDatabaseEngine');
$wsdl = new wsdl($wsdl_url, $this->mDbConfig['db_proxy_host'], $this->mDbConfig['db_proxy_port'], $this->mDbConfig['db_proxy_user'], $this->mDbConfig['db_proxy_pass'], $this->mDbConfig['db_connection_timeout'], $this->mDbConfig['db_response_timeout']);
$this->mErrorMessage = $wsdl->getError();
if ($this->mErrorMessage) {
SysLog::Log('WSDL error: ' . $this->mErrorMessage, 'DatabaseEngine');
$this->mErrorMessage = 'An error has occured when instantiating WSDL object (' . $this->mDbConfig['db_wsdl_url'] . '&nspace=' . $this->mDbConfig['db_namespace'] . '). The error was: "' . $this->mErrorMessage . '" Check your WSDL document or database configuration.';
return FALSE;
}
if ($wsdl_cache) {
$wsdl_cache->put($wsdl);
}
} else {
SysLog::Log('Cache HIT: ' . $this->mDbConfig['db_wsdl_url'] . '&nspace=' . $this->mDbConfig['db_namespace'], 'SoapDatabaseEngine');
}
// use it as usual
$temp = new soapclient($wsdl, TRUE, $this->mDbConfig['db_proxy_host'], $this->mDbConfig['db_proxy_port'], $this->mDbConfig['db_proxy_user'], $this->mDbConfig['db_proxy_pass'], $this->mDbConfig['db_connection_timeout'], $this->mDbConfig['db_response_timeout']);
$this->mErrorMessage = $temp->getError();
if (!$this->mErrorMessage) {
$this->mrDbConnection = $temp->getProxy();
if (isset($this->mDbConfig['db_credentials'])) {
$this->mrDbConnection->setCredentials($this->mDbConfig['db_credentials']['user'], $this->mDbConfig['db_credentials']['pass'], $this->mDbConfig['db_credentials']['type'], $this->mDbConfig['db_credentials']['cert']);
}
return TRUE;
} else {
SysLog::Log('Error in SoapDatabaseEngine: ' . $temp->getError(), 'SoapDatabaseEngine');
return FALSE;
}
}
示例6: PinPaymentEnquiry
function PinPaymentEnquiry($_authority)
{
$soapclient = new soapclient('https://pec.shaparak.ir/pecpaymentgateway/eshopservice.asmx?wsdl', 'wsdl');
if (!$soapclient or $err = $soapclient->getError()) {
echo $err . "<br />";
return FALSE;
} else {
$status = $_status;
$params = array('pin' => $this->pin, 'status' => $status, 'authority' => $_authority);
// to see if we can change it
$sendParams = array($params);
$res = $soapclient->call('PinPaymentEnquiry', $sendParams);
$status = $res['status'];
return $status;
}
}
示例7: invoke
public function invoke($targetObject, $function, $arguments)
{
$proxyhost = '';
$proxyport = '';
$proxyusername = '';
$proxypassword = '';
$client = new soapclient($targetObject, true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
throw new Exception($err);
}
$args = array();
foreach ($arguments as $argument) {
if ($argument instanceof IAdaptingType) {
$args[] = $argument->defaultAdapt();
} else {
$args[] = $argument;
}
}
$serviceDesription;
// if(isset($_SESSION['wsdl'][$targetObject][$function]))
// {
// $serviceDesription = unserialize($_SESSION['wsdl'][$targetObject][$function]);
// var_dump($serviceDesription);
// }
// else
// {
$webInsp = new WebServiceInspector();
$webInsp->inspect($targetObject, $function);
$serviceDesription = $webInsp->serviceDescriptor;
$_SESSION['wsdl'][$targetObject][$function] = serialize($serviceDesription);
// }
$methods = $serviceDesription->getMethods();
$method = null;
foreach ($methods as $method) {
if ($method->getName() == $function) {
break;
}
}
$postdata = array(array());
foreach ($method->getArguments() as $argument) {
$this->getArrayArguments($postdata[0], $argument->getType(), $args);
}
$result = $client->call($function, $postdata);
return new Value($result);
}
示例8: process_thanks
function process_thanks(&$vars)
{
global $db;
require_once 'lib/nusoap.php';
if ($vars['result'] != 'success') {
return "Payment failed.";
}
$client = new soapclient('http://wsdl.eu.clickandbuy.com/TMI/1.4/TransactionManagerbinding.wsdl', true);
$err = $client->getError();
if ($err) {
return "Error: " . $err;
}
$payment_id = intval($vars['payment_id']);
$pm = $db->get_payment($payment_id);
$product =& get_product($pm['product_id']);
if ($product->config['is_recurring']) {
////// set expire date to infinite
////// admin must cancel it manually!
$p['expire_date'] = '2012-12-31';
$db->update_payment($payment_id, $p);
}
if ($this->config['disable_second_confirmation']) {
$err = $db->finish_waiting_payment($pm['payment_id'], 'clickandbuy', $pm['data']['trans_id'], '', $vars);
if ($err) {
return "Error: " . $err;
}
} else {
$secondconfirmation = array('sellerID' => $this->config['seller_id'], 'tmPassword' => $this->config['tm_password'], 'slaveMerchantID' => '0', 'externalBDRID' => $pm['data']['ext_bdr_id']);
/*Start Soap Request*/
$result = $client->call('isExternalBDRIDCommitted', $secondconfirmation, 'https://clickandbuy.com/TransactionManager/', 'https://clickandbuy.com/TransactionManager/');
if ($client->fault) {
return "Soap Request Fault [" . $client->getError() . "]";
} else {
$err = $client->getError();
if ($err) {
return "Error " . $err;
} else {
$err = $db->finish_waiting_payment($pm['payment_id'], 'clickandbuy', $pm['data']['trans_id'], '', $vars);
if ($err) {
return "Error " . $err;
}
}
}
}
}
示例9: paynow_check
private function paynow_check($params)
{
$soap = "https://www.paysbuy.com/api_paynow/api_paynow.asmx?WSDL";
$method = 'api_paynow_authentication_new';
$merchant = $this->pay_model->get_merchant_data_by_pay_type($params['pay_type'], $params['method_id']);
$psbID = $merchant['merchant_key'];
$username = $merchant['merchant_name'];
$secureCode = $merchant['merchant_key2'];
// var_dump($psbID);var_dump($username);var_dump($secureCode);die();
$soap_param = array(array('psbID' => $psbID, 'username' => $username, 'secureCode' => $secureCode, 'inv' => $params['order_sn'], 'itm' => 'Buy Gold', 'amt' => $params['pay_amount'], 'paypal_amt' => 1, 'curr_type' => 'TH', 'com' => '', 'method' => 5, 'language' => 'T', 'resp_front_url' => base_url() . 'paysbuy/return_status', 'resp_back_url' => base_url() . 'paysbuy/return_status', 'opt_fix_redirect' => '1', 'opt_fix_method' => '', 'opt_name' => '', 'opt_email' => '', 'opt_mobile' => '', 'opt_address' => '', 'opt_detial' => ''));
$client = new soapclient($soap);
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;
$result = $client->__call($method, $soap_param);
$string = $result->api_paynow_authentication_newResult;
// var_dump($string);
return $string;
}
示例10: webServiceAction_nusoap
/**
* The nuSoap client implementation
*
* @return mixed The web service results
*/
function webServiceAction_nusoap(&$amfbody, $webServiceURI, $webServiceMethod, $args, $phpInternalEncoding)
{
$installed = @(include_once AMFPHP_BASE . "lib/nusoap.php");
if ($installed) {
$soapclient = new soapclient($webServiceURI, 'wsdl');
// create a instance of the SOAP client object
$soapclient->soap_defencoding = $phpInternalEncoding;
if (count($args) == 1 && is_array($args)) {
$result = $soapclient->call($webServiceMethod, $args[0]);
// execute without the proxy
} else {
$proxy = $soapclient->getProxy();
//
$result = call_user_func_array(array($proxy, $webServiceMethod), $args);
}
//echo $soapclient->getDebug();
return $result;
} else {
trigger_error("nuSOAP is not installed correctly, it should be in lib/nusoap.php", E_USER_ERROR);
}
}
示例11: inspect
public function inspect($wsdlUrl, $methodName = "")
{
// $wsdlUrl = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl";
// $wsdlUrl = "http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?wsdl";
// $wsdlUrl = "http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx?wsdl";
// $methodName = "NotifyPhoneBasic";
$wsdlXml = new DOMDocument();
$wsdlXml->load($wsdlUrl);
/*WebServiceDescriptor*/
$this->serviceDescriptor = new WebServiceDescriptor();
$this->definitions = $wsdlXml->getElementsByTagName("definitions")->item(0)->childNodes;
$this->getTypes();
/*DOMDocument*/
$service = XmlUtil::getElementByNodeName($this->definitions, "service");
/*string*/
$serviceName = $service->documentElement->getAttribute("name");
$this->serviceDescriptor->setName($serviceName);
$proxyhost = '';
$proxyport = '';
$proxyusername = '';
$proxypassword = '';
$client = new soapclient($wsdlUrl, true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
throw new Exception($err);
}
$operations = $client->getOperations($methodName);
// var_dump($operations);
// if(LOGGING)
// Log::log(LoggingConstants::MYDEBUG, ob_get_contents());
foreach ($operations as $operation) {
/*WebServiceMethod*/
$webServiceMethod = new WebServiceMethod();
$this->parseMessageInput($operation['input']['message'], $webServiceMethod);
$webServiceMethod->setReturn($this->parseMessageOutput($operation['output']['message']));
$webServiceMethod->setName($operation["name"], $webServiceMethod);
$this->serviceDescriptor->addMethod($webServiceMethod);
}
}
示例12: query_tran_detail
private function query_tran_detail($params)
{
$MerchantID = $this->merchantID;
$ReferenceID = $params['order_sn'];
$SecretPIN = $this->secret_pin;
$this->getHeartBeat();
$HeartBeat = $this->heartbeat;
$Signature = sha1(strtolower($MerchantID . $ReferenceID . $SecretPIN . $HeartBeat));
log_message('GASH', 'MOL_WALLET_RETURN_SIGN' . $Signature);
$soap_param = array();
//Sandbox
// $soap = 'http://molv3.molsolutions.com/api/login/s_module/querytrxstatus.asmx?WSDL';
//Live
$soap = 'https://global.mol.com/api/login/s_module/querytrxstatus.asmx?WSDL';
$method = 'queryTrxStatus';
$soap_param = array(array('MerchantID' => $MerchantID, 'MRef_ID' => $ReferenceID, 'HeartBeat' => $HeartBeat, 'Signature' => $Signature));
$client = new soapclient($soap);
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;
log_message('GASH', 'MOL_WALLET_SOPA_PARAM' . $soap_param);
$result = $client->__call($method, $soap_param);
$result = $result->queryTrxStatusResult;
log_message("GASH", "MOL_WALLET_QUERY_RESULT" . json_encode($result));
$msg = "儲值失敗,請聯繫遊戲客服" . $result->ResCode . "Status:" . $result->Status;
if ($result->ResCode == 100 && $result->Status == 1) {
$sign = sha1(strtolower($result->ResCode . $MerchantID . $ReferenceID . $SecretPIN . $result->Amount . $result->Currency));
// $msg=$msg."22";
log_message("GASH", "MOL_WALLET_SUCCESS" . json_encode($result));
if ($sign == $result->Signature) {
// $msg=$msg."33";
log_message("GASH", "MOL_WALLET_TRUE_SUCCESS" . json_encode($params));
if ($this->_complete_order($params)) {
$order_info = $this->CI->pay_order->get_recharge_order($params['order_sn']);
log_message("GASH", "MOL_WALLET_TRUE_GAME_SUCCESS" . json_encode($params));
$msg = "儲值成功";
$this->CI->payorder->over($msg, $order_info->order_sn);
return;
}
}
}
$this->CI->payorder->over($msg);
}
示例13: array
<?php
if (isset($_POST['send'])) {
$uname = $_POST['mail'];
$param12 = array('UserName' => "{$uname}");
$client12 = new soapclient('http://etypeservices.com/service_GetPublicationIDByUserName.asmx?WSDL');
$response12 = $client12->GetPublicationID($param12);
//echo "<pre>";
//print_r($response12);
//echo "</pre>";
if ($response12->GetPublicationIDResult == -9) {
$msg = "Invalid UserName ";
} else {
if ($response12->GetPublicationIDResult == 3053) {
$param = array('UserName' => $uname);
$client = new soapclient('http://etypeservices.com/service_ForgetPassword.asmx?WSDL');
try {
$response = $client->ForgetPassword($param);
if ($response->ForgetPasswordResult == 1) {
$msg = "Credentials have been sent to your registered email";
} else {
$msg = "User is Not Registered For This Publication";
}
} catch (Exception $e) {
echo '' . $e->getMessage();
}
} else {
$msg = "User Not Exists";
}
}
}
?>
示例14: isset
* WSDL client sample.
* Exercises a document/literal NuSOAP service (added nusoap.php 1.73).
* Does not explicitly wrap parameters.
*
* Service: WSDL
* Payload: document/literal
* Transport: http
* Authentication: none
*/
require_once '../lib/nusoap.php';
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
$useCURL = isset($_POST['usecurl']) ? $_POST['usecurl'] : '0';
$client = new soapclient('http://www.scottnichol.com/samples/hellowsdl3.wsdl', true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$client->setUseCurl($useCURL);
$person = array('firstname' => 'Willi', 'age' => 22, 'gender' => 'male');
$name = array('name' => $person);
$result = $client->call('hello', $name);
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
示例15: date
$state=$_POST['state'];
$postal=$_POST['postalcode'];
$phone=$_POST['phone'];
$publicationid=$_POST['Publication_Id'];
$planid=$_POST['planId'];
$date = date("Y-m-d");// current date
$expdate = date('Y-m-d', strtotime("+".$_POST['Period']." ".$_POST['PeriodType'].""));
$param=array('Email' =>"$email",'UserName' =>"$UserName",'Password' =>"$Password",'FirstName' =>"$firstname",'LastName'=>"$lastname",'StreetAddress'=>"$address",'City'=>"$city",'State'=>"$state",'PostalCode'=>"$postal",'Phone'=>"$phone",'ExpiryDate'=>"$expdate",'PublicationID'=>"$publicationid",'SubscriptionPlanID'=>"$planid");
}*/
// echo "<pre>";
// print_r($param);
// echo "</pre>";
$publicationid = $_SESSION['Publication_Id'];
$client1 = new soapclient('http://etypeservices.com/Service_GetPublisherPaypalEmailID.asmx?WSDL');
$param1 = array('PublicationID' => "{$publicationid}");
$response1 = $client1->GetPublisherPaypalEmailID($param1);
// echo "<pre>";
// print_r($response1);
// echo "</pre>";
?>
<div style="margin-left:30px">
<form name="form2" method="POST" action="http://www.acadiaparishtoday.com/confirm-payment" enctype="multipart/form-data">
<h3 style="Background:gray;line-height: 2.0em;font-size:16px"><center>REVIEW ORDER</center></h3>
<div style="">
<p>
Your order is almost complete. Please review the details below and click 'Continue' if all the information is correct. You may use the 'Back' button to make changes to your order if necessary.