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


PHP SoapClient::PaymentVerification方法代码示例

本文整理汇总了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;
}
开发者ID:ZarinPal-Lab,项目名称:RaPayment,代码行数:26,代码来源:function.php

示例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];
     }
 }
开发者ID:RTLer,项目名称:zarinpal-composer-library,代码行数:17,代码来源:SoapDriver.php

示例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];
     }
 }
开发者ID:zartosht,项目名称:zarinpal,代码行数:18,代码来源:SoapDriver.php

示例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;
     }
 }
开发者ID:ZarinPal-Lab,项目名称:FusionCMS,代码行数:37,代码来源:donate.php

示例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
 }
开发者ID:iamtartan,项目名称:epayment,代码行数:23,代码来源:Zarinpal.php


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