public function ItemBankDepositVerification() { if ($res = Yii::app()->functions->getOrderInfo($this->data['ref'])) { $params = array('merchant_id' => $res['merchant_id'], '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' => "item_purchase", 'client_id' => $res['client_id'], 'order_id' => $this->data['ref']); if ($this->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*/ if ($merchant_info = Yii::app()->functions->getMerchant($res['merchant_id'])) { $to = $merchant_info['contact_email']; } else { $to = ''; } $from = 'no-reply@' . $_SERVER['HTTP_HOST']; $subject = Yii::t("default", "New Bank Deposit"); $tpl = EmailTPL::bankDepositedReceiveMerchant(); if (!empty($to)) { Yii::app()->functions->sendEmail($to, $from, $subject, $tpl); } } else { $this->msg = t("Something went wrong during processing your request. Please try again later."); } } else { $this->msg = t("ERROR: Something went wrong"); } }