本文整理汇总了PHP中SoapClient::PaymentVerification方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapClient::PaymentVerification方法的具体用法?PHP SoapClient::PaymentVerification怎么用?PHP SoapClient::PaymentVerification使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoapClient
的用法示例。
在下文中一共展示了SoapClient::PaymentVerification方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: back_from_bank
function back_from_bank($Amount, $config, $transids, $lang)
{
if ($_GET['Status'] == 'OK') {
$client = new SoapClient('https://de.zarinpal.com/pg/services/WebGate/wsdl', array('encoding' => 'UTF-8'));
$result = $client->PaymentVerification(array('MerchantID' => $config['merchent_code'], 'Authority' => $_GET['Authority'], 'Amount' => $Amount / 10));
$tracking_code = $result->RefID;
$result = $result->Status;
if ($result == 100) {
$show['Status'] = 1;
$show['massage'] = $lang['Successful']['back'];
$show['trans_id1'] = $tracking_code;
$show['trans_id2'] = $_GET['Authority'];
} else {
$show['Status'] = 0;
$show['massage'] = $lang['error'][$result];
$show['trans_id1'] = $tracking_code;
$show['trans_id2'] = $_GET['Authority'];
}
} else {
$show['Status'] = 0;
$show['massage'] = $lang['error']['not_back'];
$show['trans_id1'] = $tracking_code;
$show['trans_id2'] = $_GET['Authority'];
}
return $show;
}
示例2: verify
/**
* verify driver.
*
* @param $inputs
*
* @return array
*/
public function verify($inputs)
{
$client = new \SoapClient($this->wsdlAddress, ['encoding' => 'UTF-8']);
$result = $client->PaymentVerification($inputs);
if ($result->Status == 100) {
return ['Status' => 'success', 'RefID' => $result->RefID];
} else {
return ['Status' => 'error', 'error' => $result->Status];
}
}
示例3: verify
/**
* verify driver
*
* @param $inputs
* @return array
*/
public function verify($inputs, $debug)
{
$this->debug = $debug;
$client = new \SoapClient($this->setWsdlAddress(), array('encoding' => 'UTF-8'));
$result = $client->PaymentVerification($inputs);
dd($result);
if ($result->Status == 100) {
return ['Status' => 'success', 'RefID' => $result->RefID];
} else {
return ['Status' => 'error', 'error' => $result->Status];
}
}
示例4: zarinpalreturnback
public function zarinpalreturnback()
{
$donate_zarinpal = $this->config->item('donate_zarinpal');
$MerchantID = $donate_zarinpal["MerchantID"];
$Amount = $this->session->userdata('Amount');
$Authority = $this->input->get("Authority");
$status = $this->input->get("Status");
$this->session->unset_userdata('Amount');
if ($status == 'OK') {
// URL also Can be https://ir.zarinpal.com/pg/services/WebGate/wsdl
$client = new SoapClient('https://de.zarinpal.com/pg/services/WebGate/wsdl', array('encoding' => 'UTF-8'));
$result = $client->PaymentVerification(array('MerchantID' => $MerchantID, 'Authority' => $Authority, 'Amount' => $Amount));
if ($result->Status == 100) {
// echo 'Transation success. RefID:'. $result->RefID;
$this->fields['message_id'] = $result->RefID;
$this->fields['custom'] = $user_id = $this->user->getId();
$this->fields['points'] = $this->getDpAmount($Amount);
$this->fields['timestamp'] = time();
$this->fields['converted_price'] = $Amount;
$this->fields['currency'] = $this->config->item('donation_currency_sign');
$this->fields['price'] = $Amount;
$this->fields['country'] = 'SE';
$this->db->query("UPDATE `account_data` SET `dp` = `dp` + ? WHERE `id` = ?", array($this->fields['points'], $this->fields['custom']));
$this->updateMonthlyIncome($Amount);
$this->db->insert("paygol_logs", $this->fields);
redirect($this->template->page_url . "ucp");
exit;
//die('success');
} else {
echo 'Transation failed. Status:' . $result->Status;
exit;
}
} else {
echo 'Transaction canceled by user';
exit;
}
}
示例5: doVerifyTransaction
public function doVerifyTransaction(array $options = array())
{
$this->setOptions($options);
$this->_checkRequiredOptions(array('referenceId', 'merchantCode'));
try {
$soapClient = new SoapClient($this->getWSDL());
$invoice = Model_Invoice::id($this->getInvoiceId());
$pin = $this->_config['merchantCode'];
$au = $this->_config['referenceId'];
$amount = $invoice->price;
$status = 1;
$res = $soapClient->PaymentVerification($pin, $au, $amount, $status);
} catch (SoapFault $e) {
$this->log($e->getMessage());
throw new Exception('SOAP Exception: ' . $e->getMessage());
}
if ($res == 1) {
return 1;
} else {
return $res;
}
// VerifyError
}