예제 #1
0
파일: buy.php 프로젝트: vuong93st/w-game
     break;
 case "charging":
     //Băt đầu charging
     if ($info['iffree'] != 1) {
         if (empty($_SESSION['msisdn'])) {
             flash("Hiện tại hệ thống chưa nhận diện được số thuê bao, nên không thể thanh toán hãy liên hệ với quản trị để biết thông tin chi tiết!", "content.php?id=" . $pid, 10);
         }
         if (isset($_GET['pid'])) {
             $pid = intval($_GET['pid']);
             $vals['product_id'] = $pid;
         }
         $vals['price'] = $info['price'];
         $iteminfo['name'] = $info['name'];
         $iteminfo['price'] = intval($info['price']);
         $iteminfo['product_id'] = $pid;
         $charginginfo = $payment->request($iteminfo);
         if (isset($charginginfo)) {
             $token = $charginginfo[0];
             $redirectUrl = $charginginfo[1];
             //Get Charging status
             //Save token to order
             $vals['transection_token'] = $token;
             $vals['transection_time'] = time();
             $vals['transection_method'] = 'wap-tinhvan';
             $vals['msisdn'] = $_SESSION['msisdn'];
             $vals['product_id'] = $pid;
             $vals['device_id'] = $device_id;
             $resul_s = $transection->save($vals);
             if ($resul_s == 1 && $token != "" && $token != "-1" && $token != "-2") {
                 pheader("Location: " . $redirectUrl);
             } else {