| Server IP : 103.48.194.25 / Your IP : 216.73.217.98 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/zomuaban.com/public_html/site/controllers/frontend/ |
Upload File : |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Payment extends MY_Controller {
public function __construct() {
parent::__construct();
}
public function index()
{
// redirect sang trang chinh
$this->render();
}
public function popup(){
// Hiển thị popup thanh toán
$this->load->model('transaction_model');
$this->data['wallet'] = $this->transaction_model->get_wallet_by_userId(mine()->id);
$this->render('_popup', 'popup');
}
public function ajax_card_payment(){
$pData = ajax_safe_get();
$pData->telco = 'VINA';
$pData->cardNumber = '512047266762';
$pData->cardSeri = 'ZPJ878795';
$this->load->library('Baokim');
$payment = new Baokim;
$result = $payment->thecao($pData->telco,$pData->cardNumber, $pData->cardSeri);
$data = new stdClass();
if ($result['status'] === 200) {
$data->success = true;
$data->msg = 'Nap tien thanh cong';
$data->result = $result;
echo json_encode($data);
}else {
$data->success = false;
$data->msg = $result['errorMessage'];
$data->result = $result;
echo json_encode($data);
}
}
}