public function checkRechaMoneyStatus()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $bkntno = trim($arr_body['bkntno']);
     //交易流水号
     //$paycardid = trim(GetPayCalcuInfo::readpaycardid($arr_body['paycardid'])); //刷卡器设备号
     $authorid = trim($arr_channelinfo['authorid']);
     //authorid
     $result = $arr_body['result'];
     $nowdate = date("Y-m-d H:i:s");
     //手机卡充值业务
     $query = "select fd_mrclist_bkordernumber as bkordernumber,fd_mrclist_authorid as authorid ,\n                  fd_mrclist_date as orderdate ,DATE_FORMAT(fd_mrclist_date,'%Y%m%d') as orderTime,\n                  fd_mrclist_qq as qq\n                  from tb_qqrechargelist\n                  where 1  and  fd_mrclist_bkntno = '{$bkntno}' and fd_mrclist_authorid = '{$authorid}'  limit 1";
     $arr_val = $db->get_one($query);
     $orderNumber = $arr_val['bkordernumber'];
     $orderTime = $arr_val['orderTime'];
     $arr_returninfo = BankPayInfo::bankorderquery($authorid, '', $orderNumber, $orderTime);
     $arr_returninfo = $this->Publiccls->xml_to_array($arr_returninfo);
     //  print_r($arr_returninfo);
     // exit;
     if (!is_array($arr_returninfo)) {
         $arr_message = array("result" => "failure", "message" => "请等待,正在为您充值中!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $of_retcode = $arr_returninfo['orderinfo']['retcode'];
         //欧飞接口1为成功 跟我们自己的成功 0
         if ($of_retcode == 1) {
             $retcode = 0;
             //反馈状态 0 成功 200 自定义错误
             $arr_message = array("result" => "success", "message" => $arr_returninfo['orderinfo']['err_msg']);
         } else {
             $retcode = $of_retcode;
             //反馈状态 0 成功 200 自定义错误
             $arr_message = array("result" => "failure", "message" => $arr_returninfo['orderinfo']['err_msg']);
         }
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #2
0
 public function orderPayrqStatus()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $bkntno = trim($arr_body['bkntno']);
     //交易流水号
     //$paycardid = trim(GetPayCalcuInfo::readpaycardid($arr_body['paycardid'])); //刷卡器设备号
     $authorid = trim($arr_channelinfo['authorid']);
     //authorid
     $result = $arr_body['result'];
     $nowdate = date("Y-m-d H:i:s");
     //手机卡充值业务
     $query = "select fd_orderlist_bkordernumber as bkordernumber,fd_orderlist_authorid as authorid ,\n                  fd_orderlist_date as orderdate ,DATE_FORMAT(fd_orderlist_date,'%Y%m%d') as orderTime\n                  from tb_orderglist\n                  where 1  and  fd_orderlist_bkntno = '{$bkntno}' and fd_orderlist_authorid = '{$authorid}'  limit 1";
     $arr_val = $db->get_one($query);
     $orderNumber = $arr_val['bkordernumber'];
     $orderTime = $arr_val['orderTime'];
     $arr_returninfo = BankPayInfo::bankorderquery($authorid, '', $orderNumber, $orderTime);
     $arr_returninfo = $this->Publiccls->xml_to_array($arr_returninfo);
     if ($result == 'success') {
         $retcode = 0;
         //反馈状态 0 成功 200 自定义错误
         $arr_message = array("result" => "success", "message" => "订单已支付完成");
     } else {
         $retcode = 0;
         //反馈状态 0 成功 200 自定义错误
         $arr_message = array("result" => "success", "message" => "交易已取消");
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #3
0
 public function insertSupTransferMoney()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $bkntno = trim($arr_body['bkntno']);
     //银行交易流水号
     $authorid = trim($arr_channelinfo['authorid']);
     $nowdate = date("Y-m-d H:i:s");
     $result = $arr_body['result'];
     $query = "select fd_tfmglist_bkordernumber as bkordernumber,fd_tfmglist_authorid as authorid ,\n                  DATE_FORMAT(fd_tfmglist_paydate,'%Y%m%d') as orderTime\n                  from tb_transfermoneyglist\n                  where 1  and  fd_tfmglist_bkntno = '{$bkntno}' and fd_tfmglist_authorid = '{$authorid}'  limit 1";
     $arr_val = $db->get_one($query);
     $orderNumber = $arr_val['bkordernumber'];
     $orderTime = $arr_val['orderTime'];
     $arr_returninfo = BankPayInfo::bankorderquery($authorid, '', $orderNumber, $orderTime);
     $arr_returninfo = $this->Publiccls->xml_to_array($arr_returninfo);
     if ($result == 'success' && $bkntno != "") {
         $query = "update  tb_transfermoneyglist set fd_tfmglist_payrq ='00' ,fd_tfmglist_paydate ='{$nowdate}' \n\t\t\t\t\t          where fd_tfmglist_bkntno = '{$bkntno}'";
         $db->query($query);
         $query = "update  tb_agentpaymoneylist set fd_agpm_payrq = '00'  where fd_agpm_bkntno = '{$bkntno}'";
         $db->query($query);
         $arr_message = array("result" => "success", "message" => "支付成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     } else {
         if ($result == 'cancel') {
             //			$query = "update  tb_transfermoneyglist set fd_tfmglist_payrq ='03' ,fd_tfmglist_paydate ='$nowdate'
             //					          where fd_tfmglist_bkntno = '$bkntno'";
             //			$db->query($query);
             //			$query = "update  tb_agentpaymoneylist set fd_agpm_payrq = '03'  where fd_agpm_bkntno = '$bkntno'";
             //			$db->query($query);
             $arr_message = array("result" => "success", "message" => "支付失败!");
             $retcode = "200";
             //反馈状态 0 成功 200 自定义错误
         }
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $returnvalue = array("msgbody" => array('result' => $arr_message['result'], "message" => $arr_message['message'], $arr_returninfo));
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }