本文整理汇总了PHP中nusoap_client::getProxy方法的典型用法代码示例。如果您正苦于以下问题:PHP nusoap_client::getProxy方法的具体用法?PHP nusoap_client::getProxy怎么用?PHP nusoap_client::getProxy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nusoap_client
的用法示例。
在下文中一共展示了nusoap_client::getProxy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PinPaymentRequest
function PinPaymentRequest($_amount, $_orderId, $_callbackUrl)
{
date_default_timezone_set("Asia/tehran");
$soapclient = new nusoap_client('https://pec.shaparak.ir/pecpaymentgateway/eshopservice.asmx?wsdl', 'wsdl');
$err = $soapclient->getError();
if (!$err) {
$soapProxy = $soapclient->getProxy();
}
if (!$soapclient or $err) {
$error = $err . "<br />";
echo $error;
return false;
} else {
$amount = $_amount;
// here is the posted amount
$orderId = $_orderId;
// this function is internal which will get order id
$authority = 0;
// default authority
$status = 1;
// default status
$callbackUrl = $_callbackUrl;
// site call back Url
$params = array('pin' => $this->pin, 'amount' => $amount, 'orderId' => $orderId, 'callbackUrl' => $callbackUrl, 'authority' => $authority, 'status' => $status);
$send = array($params);
$res = $soapclient->call('PinPaymentRequest', $send);
$authority = $res['authority'];
$status = $res['status'];
return array('status' => $status, 'authority' => $authority);
}
}
示例2: include_crm
function include_crm()
{
global $wpdb;
$table_name = $wpdb->prefix . "crm_config";
require_once 'lib/nusoap.php';
$crm_option = $wpdb->get_row("SELECT * FROM " . $table_name . " WHERE id = 0", ARRAY_A);
$config['sugar_server'] = $crm_option['url'] . "/soap.php?wsdl";
// the Sugar username and password to login via SOAP
$config['login'] = array('user_name' => $crm_option['username'], 'password' => $crm_option['password']);
$config['application_name'] = substr(strrchr($crm_option['url'], '/'), 1);
?>
<?php
//print_r($config);
// open a connection to the server
$sugarClient = new nusoap_client($config['sugar_server'], 'wsdl');
if (!$sugarClient) {
echo 'Please check your settings here';
exit;
}
/* echo "<pre>";
print_r($sugarClient);
die; */
$err = $sugarClient->getError();
if ($err) {
var_dump($err);
die("asdfas");
}
$sugarClientProxy = $sugarClient->getProxy();
if (!$sugarClientProxy) {
echo 'URL is not valid for SugarCRM config settings , please check it out ';
echo '<a href=' . site_url('wp-admin/admin.php?page=crm_config') . '>Here</a>';
exit;
}
// login using the credentials above
$result = $sugarClientProxy->login($config['login'], $config['application_name']);
$session_id = $result['id'];
/*
if($session_id ){
echo 'UserName or PassWord was wrong. Please Check it out ';
echo '<a href='.site_url('wp-admin/admin.php?page=crm_config').'>Here</a>';
exit();
}
*/
$result = $sugarClientProxy->seamless_login($session_id);
?>
<div id="crm_panel">
<iframe src="<?php
echo $crm_option['url'];
?>
/index.php?module=Home&action=index&MSID=<?php
echo $session_id;
?>
" scrolling="auto" frameborder="0" width="100%" height="2000"></iframe>
</div>
<?php
}
示例3: ubio_namebank_search
/**
* @brief Call uBio's SOAP service to find all names that match query.
*
* @param Text The name to search for.
* @param has_authority
*/
function ubio_namebank_search($text, $has_authority = false)
{
global $config;
global $db;
// Maybe we have this already?
$namebankID = find_ubio_name_in_cache($text, $has_authority);
if (count($namebankID) > 0) {
return $namebankID;
}
// Not found, so make SOAP call
$client = new nusoap_client('http://names.ubio.org/soap/', 'wsdl', $config['proxy_name'], $config['proxy_port'], '', '');
$err = $client->getError();
if ($err) {
return $names;
}
// This is vital to get through Glasgow's proxy server
$client->setUseCurl(true);
$param = array('searchName' => base64_encode($text), 'searchAuth' => '', 'searchYear' => '', 'order' => 'name', 'rank' => '', 'sci' => 1, 'linkedVern' => 1, 'vern' => 1, 'keyCode' => $config['uBio_key']);
$proxy = $client->getProxy();
$result = $proxy->namebank_search($param['searchName'], $param['searchAuth'], $param['searchYear'], $param['order'], $param['rank'], $param['sci'], $param['linkedVern'], $param['vern'], $param['keyCode']);
// Check for a fault
if ($proxy->fault) {
// print_r($result);
} else {
// Check for errors
$err = $proxy->getError();
if ($err) {
} else {
// Display the result
print_r($result);
if (isset($result['scientificNames'])) {
// get the relevant matches
foreach ($result['scientificNames'] as $r) {
if ($has_authority) {
$n = strtolower(base64_decode($r['fullNameString']));
// Strip punctuation
$n = str_replace(",", "", $n);
$n = str_replace("(", "", $n);
$n = str_replace(")", "", $n);
$text = str_replace(",", "", $text);
$text = str_replace("(", "", $text);
$text = str_replace(")", "", $text);
} else {
$n = strtolower(base64_decode($r['nameString']));
}
//echo $n;
if ($n == strtolower($text)) {
// Store this name
array_push($namebankID, $r['namebankID']);
}
// Store name in cache
store_ubio_name($r);
}
}
}
}
return $namebankID;
}
示例4: Step3_PinPaymentEnquiry
public function Step3_PinPaymentEnquiry($authorityCode)
{
try {
$soap = new nusoap_client($this->wsdl, "wsdl");
} catch (Exception $e) {
return $e;
}
$proxy = $soap->getProxy();
// set parameter parameters (PinPaymentEnquiry^)
$parameters = array('pin' => $this->pin, 'authority' => $authorityCode, 'status' => 0);
// get the result, a native PHP type, such as an array or string
return $proxy->PinPaymentEnquiry($parameters);
}
示例5: login
public function login()
{
if ($this->input->post()) {
//$this->form_validation->set_rules('inputWs', 'URL Webservice', 'trim|required');
$this->form_validation->set_rules('inputUsername', 'Username Feeder', 'trim|required');
$this->form_validation->set_rules('inputPassword', 'Password Feeder', 'required');
//$ws = $this->input->post('inputWs', TRUE);
$username = $this->input->post('inputUsername', TRUE);
$password = $this->input->post('inputPassword', TRUE);
$temp_ws = $this->input->post('db_ws');
if ($this->form_validation->run() == TRUE) {
$ws = $temp_ws == 'on' ? $this->dir_ws . 'live.php?wsdl' : $this->dir_ws . 'sandbox.php?wsdl';
$ws_client = new nusoap_client($ws, true);
$temp_proxy = $ws_client->getProxy();
$temp_error = $ws_client->getError();
if ($temp_proxy == NULL) {
$this->session->set_flashdata('error', 'Gagal melakukan koneksi ke Webservice Feeder.<br /><pre>' . $temp_error . '</pre>');
//$this->session->set_flashdata('error',$temp_error);
redirect(base_url());
} else {
$temp_token = $temp_proxy->GetToken($username, $password);
if ($temp_token == 'ERROR: username/password salah') {
$this->session->set_flashdata('error', $temp_token);
redirect(base_url());
} else {
//$temp_npsn = substr($username, 0,6);
$temp_npsn = read_file('setting.ini');
//echo $temp_npsn;
$filter_sp = "npsn = '" . $temp_npsn . "'";
$temp_sp = $temp_proxy->getrecord($temp_token, 'satuan_pendidikan', $filter_sp);
//var_dump($temp_sp);
if ($temp_sp['result']) {
$id_sp = $temp_sp['result']['id_sp'];
} else {
$id_sp = '0';
}
$sessi = array('login' => TRUE, 'ws' => $ws, 'token' => $temp_token, 'username' => $username, 'password' => $password, 'url' => base_url(), 'kode_pt' => $temp_npsn, 'id_sp' => $id_sp);
$this->session->sess_expiration = '900';
//session expire 15 Minutes
$this->session->sess_expire_on_close = 'true';
$this->session->set_userdata($sessi);
//var_dump($sessi);
redirect('welcome');
}
}
}
}
tampil('__f_login');
}
示例6: verifyTransaction
function verifyTransaction($RefNum, $UserName)
{
$client = new nusoap_client('https://ebank.ansarbank.com/merchantwebservice/services/PaymentRpcWebServiceImpl?wsdl', 'wsdl');
if (!($error = $client->getError())) {
//if((!$client) or ($error=$client->getError()))
// echo $error."<br>" ;
//set parameters as an array
$params[] = array("refNum" => $RefNum, "sellerId" => $UserName);
}
$soapProxy = $client->getProxy();
//$error = $soapProxy->getError();
//if ($error) die($error);
$result = $soapProxy->verifyTransaction($params);
//refNum And sellerId in an Array will send to get verify results
return $result[0];
}
示例7: GetService
/**
* Enter description here...
*
* @param string $wsdl
* @param bool $forceNuSoap
* @return SoapClient
*/
public static function GetService($wsdl, $forceNuSoap = false)
{
if (extension_loaded("soap") && !$forceNuSoap) {
Debug::PrintValue("Local");
$client = new SoapClient($wsdl);
return $client;
} else {
Debug::PrintValue("NuSoap");
if (!SoapClientWrapper::$_readed) {
//Debug::PrintValue("Read NuSoap");
require_once "nusoap.php";
SoapClientWrapper::$_readed = true;
}
$client = new nusoap_client($wsdl, 'wsdl');
$proxy = $client->getProxy();
return $proxy;
}
}
示例8: routeToCrm
public function routeToCrm($host, $username, $password, $databaseName)
{
if (isset($_COOKIE['username'])) {
$user = $_COOKIE['username'];
}
if (isset($_COOKIE['mdp'])) {
//Récupération du mot de passe stocké
$db = new MysqliDb($host, $username, $password, $databaseName);
$db->where("user_name", $user);
$users = $db->getOne("users");
$pwd = $users['user_hash'];
// Création du mot de passe hashé
// $mdp = crypt(strtolower($_COOKIE['mdp']),$pwd);
$mdp = $_COOKIE['mdp'];
}
// Login au CRM
$url = "http://localhost/mysite/crm74/service/v4_1/soap.php?wsdl";
require_once "../crm74/include/nusoap/lib/nusoap.php";
//retrieve WSDL
$client = new nusoap_client($url, 'wsdl');
$proxy = $client->getProxy();
//Affichage des erreurs
$err = $client->getError();
if ($err) {
echo '<h2>Erreur du constructeur</h2><pre>' . $err . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
exit;
}
// login ----------------------------------------------------
$login_parameters = array('user_auth' => array('user_name' => $user, 'password' => $mdp, 'version' => '1'), 'application_name' => 'SugarTest');
$login_result = $client->call('login', $login_parameters);
echo '<pre>';
//get session id
$session_id = $login_result['id'];
$result = $proxy->seamless_login($session_id);
// Ouverture de la session SuiteCRM
header("Location: http://localhost/mysite/crm74/index.php?module=Administration&action=index&MSID={$session_id}");
}
示例9: __run
/**
*
* __run
*
* @access protected
* @param
* @return
*/
protected function __run($xml_request, $soap_action)
{
$client = new nusoap_client($this->endpoint_url, true);
$client->soap_defencoding = 'utf-8';
$client->useHTTPPersistentConnection();
$proxy = $client->getProxy();
$this->response = $proxy->send($xml_request, $soap_action);
if ($client->fault) {
$this->response_success = FALSE;
} else {
// Check for errors
$err = $client->getError();
if ($err) {
$this->response_error = $err;
$this->response_success = FALSE;
} else {
$this->response_success = TRUE;
}
}
}
示例10: executeEsitefTest
public function executeEsitefTest(sfWebRequest $request)
{
//$client = new nusoap_client(sfConfig::get('app_esitef_url'), true, false, false, false, false, sfConfig::get('app_esitef_connection_timeout',110), sfConfig::get('app_esitef_response_timeout',110));
$client = new nusoap_client(sfConfig::get('app_esitef_url'), true);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
exit;
}
$transactionRequest = array('transactionRequest' => array('amount' => '45645', 'extraField' => 'bonus', 'merchantId' => 'vendorepuestos', 'merchantUSN' => '18700281', 'orderId' => '18700281'));
$payment = $client->getProxy();
if (!$payment) {
echo '<h2>Fault</h2><pre>';
echo 'No hay proxy';
echo '</pre>';
}
$transactionResponse = $payment->beginTransaction($transactionRequest);
echo '<h2>Begin Transaction Result</h2><pre>';
print_r($transactionResponse['transactionResponse']);
echo '</pre>';
$nit = $transactionResponse['transactionResponse']['nit'];
$paymentRequest = array('paymentRequest' => array('authorizerId' => '1', 'autoConfirmation' => 'true', 'cardExpiryDate' => '0516', 'cardNumber' => '4000000000000044', 'cardSecurityCode' => '999', 'customerId' => '18700266', 'extraField' => 'bonus', 'installmentType' => '3', 'installments' => '1', 'nit' => $nit));
$result = $payment->doPayment($paymentRequest);
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>';
print_r($result['paymentResponse']);
echo '</pre>';
}
}
$getStatusParams = array('merchantKey' => sfConfig::get('app_esitef_merchant_key'), 'nit' => $nit);
$transactionStatus = $payment->getStatus($getStatusParams);
echo '<h2>GetStatus Result</h2><pre>';
print_r($transactionStatus);
echo '</pre>';
echo '<h2>Request</h2><pre>' . htmlspecialchars($payment->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($payment->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
die;
}
示例11: SugarSoap
function SugarSoap()
{
$soapclient = new nusoap_client('http://208.109.162.122/cafemgmt/soap.php?wsdl', true);
$this->proxy = $soapclient->getProxy();
}
示例12: array
<?php
// Pull in the NuSOAP code
require_once '../core/SOAP/nusoap.php';
// Create the client instance
$client = new nusoap_client('http://norex.chatetheory.com/SOAP/server.php?wsdl', true);
// Call the SOAP method
$proxy = $client->getProxy();
$err = $proxy->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
}
$result = $proxy->call('cmsversion', array());
// Display the result
echo 'CMS Version: ';
print_r($result);
echo "<br /><br />";
$result = $proxy->call('moduleversions', array());
// Display the result
echo 'Modules Version: <br />';
foreach ($result as $mod) {
echo '<strong>Module:</strong> ' . $mod['name'] . ' <strong>Version:</strong> ' . $mod['version'] . "<br />";
}
echo '<p>This is a SOAP method provided by the Content Module</p>';
echo '<strong>Link Type of Content Module: </strong>';
$result = $proxy->call('Module_Content.linkType', array());
echo $result;
示例13: conectarBvcHistorico
public function conectarBvcHistorico()
{
ini_set("default_socket_timeout", 1200);
$result = '';
$this->TipoError = 0;
//Establecer que no hay error.
try {
// Conexion con WebService
$client = new nusoap_client($this->ServicioWeb, true);
$e = $client->getError();
if ($e) {
echo '<h2>Constructor error: </h2><pre>' . $e . '</pre>';
$this->TipoError = 1;
//Establecer el indicador de error en true para determinar que hubo error.
$this->Error = "Constructor error: " . $e->getMessage() . "\nError Conectando con servicio web de BVC";
}
$proxy = $client->getProxy();
$param = array('in0' => $this->Id, 'in1' => $this->Ip, 'in2' => $this->Usuario, 'in3' => $this->Clave);
// Consumo de la function XMLNemotecnico pasando como parametros los permisionados
$return = $client->call("XMLNemotecnico", $param);
if ($proxy->fault) {
echo '<h2>Fault</h2><pre>';
print_r($return);
echo '</pre>';
}
//se carga el resultado en un objeto XML
$xml = simplexml_load_string($return);
$objConexion = new Conexion();
//Objeto conexión para establecer la conexión con la BD.
$this->Conexion = $objConexion->conectarServidor();
//Obtener conexión al servidor de base de datos.
if (!$objConexion->ObtenerIndicadorError()) {
$sentencia = sprintf("CALL Pst_insertarStockBvcHistorico(Convert('%s',DateTime),'%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f','%f',Convert('%s',DateTime))", mysqli_real_escape_string($this->Conexion, $xml->Instrumento[0]->FechaRegistro), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[0]->PrecioCierre)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[0]->Variacion)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[0]->Volumen)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[0]->PrecioCierreAnterior)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[1]->PrecioCierre)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[1]->Variacion)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[1]->Volumen)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[1]->PrecioCierreAnterior)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[2]->PrecioCierre)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[2]->Variacion)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[2]->Volumen)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[2]->PrecioCierreAnterior)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->PrecioCierre)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->PrecioMenor)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->PrecioMedio)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->PrecioMayor)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->Unidad)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->Variacion)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->Volumen)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->PrecioCierreAnterior)), mysqli_real_escape_string($this->Conexion, str_replace(",", "", $xml->Instrumento[3]->FechaPrecioCierreAnterior)));
//Llamada al procedimiento almacenado que realiza la inserción en la base de datos.
if (!mysqli_query($this->Conexion, $sentencia)) {
$this->TipoError = 1;
//Asignar error de sistema.
$this->Error = mysqli_error($this->Conexion);
//Almacenar el error en la propiedad Error de la clase.
}
mysqli_close($this->Conexion);
} else {
$this->TipoError = 1;
//Asignar error de sistema.
$this->Error = $objConexion->ObtenerError();
//Obtener el error que ocurrió en la conexión y asignarlo a la propiedad Error de la clase.
}
//return $return;
} catch (Exception $e) {
$this->TipoError = 1;
//Establecer el indicador de error en true para determinar que hubo error.
$this->Error = "Error Conectando con BVC" . $e->getMessage();
}
}
示例14: process
function process()
{
global $osC_Database, $osC_Customer, $osC_Currencies, $osC_ShoppingCart, $_POST, $_GET, $osC_Language, $messageStack;
require_once 'ext/lib/nusoap.php';
$ResNum = $_POST['ResNum'];
$RefNum = $_POST['RefNum'];
$State = $_POST['State'];
// get amount & order Id
if (MODULE_PAYMENT_ENBANK_CURRENCY == 'Selected Currency') {
$currency = $osC_Currencies->getCode();
} else {
$currency = MODULE_PAYMENT_ENBANK_CURRENCY;
}
$amount = round($osC_Currencies->formatRaw($osC_ShoppingCart->getTotal(), $currency), 2);
//
if ($State != 'OK' and $RefNum == '') {
// here we update our database
osC_Order::remove($this->_order_id);
$messageStack->add_session('checkout', check_enbank_state_error($State), 'error');
osc_redirect(osc_href_link(FILENAME_CHECKOUT, 'checkout&view=paymentInformationForm', 'SSL', null, null, true));
} else {
$soapclient = new nusoap_client('https://pna.shaparak.ir/ref-payment/jax/merchantAuth?wsdl', 'wsdl');
// $soapclient->debug_flag=true;
$soapProxy = $soapclient->getProxy();
// if($err=$soapclient->getError())
// echo $err ;
// echo $soapclient->debug_str;
// $i = 5; //to garantee the connection and verify, this process should be repeat maximum 5 times
// do{
$res = $soapProxy->verifyTransaction($RefNum, MODULE_PAYMENT_ENBANK_MERCHANT_ID);
//reference number and sellerid
// $i -= 1;
// } while((!$res) and ($i>0));
$err = $soapProxy->getError();
if ($err) {
osC_Order::remove($this->_order_id);
$messageStack->add_session('checkout', 'خطا در تایید تراکنش ، مبلغ تراکنش با موفقیت به حساب شما برگشت داده خواهد شد.', 'error');
osc_redirect(osc_href_link(FILENAME_CHECKOUT, 'checkout&view=paymentInformationForm', 'SSL', null, null, true));
die;
}
if ($res <= 0) {
// this is a unsucccessfull payment
// we update our DataBase
osC_Order::remove($this->_order_id);
$messageStack->add_session('checkout', check_enbank_res_error($res), 'error');
osc_redirect(osc_href_link(FILENAME_CHECKOUT, 'checkout&view=paymentInformationForm', 'SSL', null, null, true));
} else {
if ($res == $amount) {
// this is a succcessfull payment
// we update our DataBase
// insert ref id in database
$osC_Database->simpleQuery("insert into `" . DB_TABLE_PREFIX . "online_transactions`\n\t\t\t\t\t \t\t(orders_id,receipt_id,transaction_method,transaction_date,transaction_amount,transaction_id) values\n\t\t ('{$ResNum}','{$RefNum}','enbank','" . date("YmdHis") . "','{$amount}','{$RefNum}')\n\t\t\t\t\t ");
//
$Qtransaction = $osC_Database->query('insert into :table_orders_transactions_history (orders_id, transaction_code, transaction_return_value, transaction_return_status, date_added) values (:orders_id, :transaction_code, :transaction_return_value, :transaction_return_status, now())');
$Qtransaction->bindTable(':table_orders_transactions_history', TABLE_ORDERS_TRANSACTIONS_HISTORY);
$Qtransaction->bindInt(':orders_id', $ResNum);
$Qtransaction->bindInt(':transaction_code', 1);
$Qtransaction->bindValue(':transaction_return_value', $RefNum);
$Qtransaction->bindInt(':transaction_return_status', 1);
$Qtransaction->execute();
//
$this->_order_id = osC_Order::insert();
$comments = $osC_Language->get('payment_enbank_method_authority') . '[' . $RefNum . ']';
osC_Order::process($this->_order_id, $this->order_status, $comments);
} else {
osC_Order::remove($this->_order_id);
$messageStack->add_session('checkout', 'خطا در تاييد مبلغ تراکنش ، مبلغ تراکنش با موفقيت به حساب شما برگشت داده خواهد شد.', 'error');
osc_redirect(osc_href_link(FILENAME_CHECKOUT, 'checkout&view=paymentInformationForm', 'SSL', null, null, true));
}
}
}
}
示例15: keywordSearch
function keywordSearch($search, $page, $mode = 'Books')
{
$this->Service = "AWSECommerceService";
$this->Operation = "ItemSearch";
$this->AWSAccessKeyId = DEVTAG;
$this->AssociateTag = ASSOCIATEID;
$this->ResponseGroup = "Large";
$this->SearchIndex = $mode;
$this->Keywords = $search;
if (METHOD == 'SOAP') {
$soapclient = new nusoap_client('http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl', 'wsdl');
$soap_proxy = $soapclient->getProxy();
$request = array('Service' => $this->Service, 'Operation' => $this->Operation, 'ResponseGroup' => $this->ResponseGroup, 'SearchIndex' => $this->SearchIndex, 'Keywords' => $this->Keywords);
$parameters = array('AWSAccessKeyId' => DEVTAG, 'AssociateTag' => ASSOCIATEID, 'Request' => array($request));
// perform actual soap query
$result = $soap_proxy->ItemSearch($parameters);
if (isSOAPError($result)) {
return false;
}
$this->totalResults = $result['TotalResults'];
foreach ($result['Items']['Item'] as $product) {
$this->products[] = new Product($product);
}
unset($soapclient);
unset($soap_proxy);
} else {
$this->url = "http://ecs.amazonaws.com/onca/xml?" . "Service=" . $this->Service . "&Operation=" . $this->Operation . "&AssociateTag=" . $this->AssociateTag . "&AWSAccessKeyId=" . $this->AWSAccessKeyId . "&ResponseGroup=" . $this->ResponseGroup . "&SearchIndex=" . $this->SearchIndex . "&Keywords=" . $this->Keywords;
$this->parseXML();
}
return $this->products;
}