Esempio n. 1
0
<?php

$ref = isset($_GET['ref']) ? $_GET['ref'] : '';
$FunctionsK = new FunctionsK();
?>

<div class="page-right-sidebar payment-option-page">
  <div class="main">
  <div class="inner">
  
  <?php 
if ($res = $FunctionsK->getFaxTransactionByRef($ref)) {
    ?>
  
  <h2><?php 
    echo Yii::t("default", "Bank Deposit verification");
    ?>
</h2>
    
  <p class="uk-text-muted">
  <?php 
    echo Yii::t("default", "Please enter the details of your bank deposit payment below.");
    ?>
<br/>
  <?php 
    echo Yii::t("default", "Failure to provide accurate information may cause delays in processing or invalidation of your payment.");
    ?>
  </p>
  
  <form class="uk-form uk-form-horizontal forms" id="forms">
  <?php 
Esempio n. 2
0
 public function FaxbankDepositVerification()
 {
     $FunctionsK = new FunctionsK();
     if (isset($this->data['photo'])) {
         $req = array('ref' => t("reference number is required"));
     } else {
         $req = array('branch_code' => t("branch code is required"), 'date_of_deposit' => t("date of deposit is required"), 'time_of_deposit' => t("time of deposit is required"), 'amount' => t("amount is required"));
     }
     $Validator = new Validator();
     $Validator->required($req, $this->data);
     if ($Validator->validate()) {
         $DbExt = new DbExt();
         if ($res = $FunctionsK->getFaxTransactionByRef($this->data['ref'])) {
             $params = array('merchant_id' => Yii::app()->functions->getMerchantID(), 'branch_code' => $this->data['branch_code'], 'date_of_deposit' => $this->data['date_of_deposit'], 'time_of_deposit' => $this->data['time_of_deposit'], 'amount' => $this->data['amount'], 'scanphoto' => isset($this->data['photo']) ? $this->data['photo'] : '', 'date_created' => date('c'), 'ip_address' => $_SERVER['REMOTE_ADDR'], 'transaction_type' => "fax_purchase");
             if ($DbExt->insertData("{{bank_deposit}}", $params)) {
                 $this->code = 1;
                 $this->msg = Yii::t("default", "Thank you. Your information has been receive please wait 1 or 2 days to verify your payment.");
                 /*send email to admin owner*/
                 $from = 'no-reply@' . $_SERVER['HTTP_HOST'];
                 $subject = Yii::t("default", "New Bank Deposit");
                 $to = Yii::app()->functions->getOptionAdmin('website_contact_email');
                 $tpl = EmailTPL::bankDepositedReceive();
                 if (!empty($to)) {
                     Yii::app()->functions->sendEmail($to, $from, $subject, $tpl);
                 }
             } else {
                 $this->msg = Yii::t("default", "Something went wrong during processing your request. Please try again later.");
             }
         } else {
             $this->msg = Yii::t("default", "Reference number not found");
         }
     } else {
         $this->msg = $Validator->getErrorAsHTML();
     }
 }