Пример #1
0
 public function getSmsCode()
 {
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $db = new DB_test();
     $phone = $arr_body['smsmobile'];
     $id = "0";
     $uid = "nicegan";
     //用户账户
     $pwd = "chengan";
     //用户密码
     $mobno = $phone;
     //发送的手机号码,多个请以英文逗号隔开如"138000138000,138111139111"
     $code = getCode(6, 60, 20);
     $target = "http://www.dxton.com/webservice/sms.asmx/Submit";
     $post_data = "account=" . $uid . "&password="******"&mobile=" . $mobno . "&content=" . rawurlencode("您的验证码是:" . $code . ",【通付宝】。如需帮助请联系客服。");
     $getvalue = $this->Post($post_data, $target);
     //$getvalue = Get($url);
     if (!is_numeric($getvalue)) {
         $arr_message = array("result" => "failure", "message" => "短信发送失败!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $arr_message = array("result" => "success", "message" => "短信发送成功");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     }
     $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 readKuaiDicmpList()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $apptype = trim($arr_body['apptype']);
     $appversion = trim($arr_body['appversion']);
     $query = "select fd_kdcompany_id as comid,fd_kdcompany_no as com,fd_kdcompany_name as comname\n\t\t         ,fd_kdcompany_api as apitype,fd_kdcompany_pic as comlogo ,fd_kdcompany_phone as comphone from \n\t             tb_kdcompany where fd_kdcompany_active = '1' order by fd_kdcompany_api desc";
     //只显示激活的列表
     $db->query($query);
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     if (!$arr_msg) {
         $arr_message = array("result" => "failure", "message" => "列表为空!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $arr_message = array("result" => "success", "message" => "读取成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     }
     $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 readHelpList()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $msgstart = $arr_body['msgstart'] + 0;
     $msgdisplay = $arr_body['msgdisplay'] + 0;
     if ($msgstart < 0) {
         $msgstart = 0;
     }
     $query = "select  1 from web_help order by fd_help_no ";
     $db->query($query);
     $msgallcount = $db->nf();
     $query = "select fd_help_id as helpid ,fd_help_name as helpname,fd_help_contect as helpcontent,\n\t          fd_help_date as helpdate from web_help order by fd_help_no limit {$msgstart}, {$msgdisplay}  ";
     $db->query($query);
     $msgdiscount = $db->nf();
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     $arr_message = array("result" => "success", "message" => "读取成功!");
     $retcode = "0";
     //反馈状态 0 成功 200 自定义错误
     $arr_msg['msgbody']['msgallcount'] = $msgallcount;
     $arr_msg['msgbody']['msgdiscount'] = $msgdiscount + $msgstart;
     $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;
 }
Пример #4
0
 public function validateUser()
 {
     $retcode = "200";
     $arr_message = array("result" => "fail", "message" => "操作出现异常,请稍后再试!");
     $db = new DB_test();
     $phonenumber = trim($this->arr_body['phonenumber']);
     $query = "SELECT fd_author_id FROM tb_author WHERE fd_author_username = '******'";
     $authorid = $db->get_all($query);
     if ($authorid != 0 && count($authorid) > 0) {
         $authorid = $authorid[0]["fd_author_id"];
         $query = "SELECT Q.fd_question_contect  AS que, A.fd_answer AS answer \n\t\t\t\t\tFROM tb_safeguard_secque_useranswer AS A \n\t\t\t\t\tINNER JOIN tb_safeguard_secque AS Q ON A.fd_question_id = Q.fd_question_id \n\t\t\t\t\tWHERE A.fd_author_id = " . $authorid;
         $db->query($query);
         $retcode = "0";
         if ($db->nf() > 0) {
             $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
             $arr_msg['msgbody']['authorid'] = $authorid;
             $arr_message = array("result" => "success", "message" => "成功获取密保问题");
         } else {
             $retcode = "200";
             $arr_message = array("result" => "failure", "message" => "您还未设置过密保问题");
         }
     } else {
         $retcode = "200";
         $arr_message = array("result" => "failure", "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;
 }
Пример #5
0
 function __construct($err_info)
 {
     $retcode = "700";
     //数据库错误
     $arr_msg['msgbody']['result'] = 'failure';
     $arr_msg['msgbody']['message'] = $err_info;
     $returnvalue[] = $arr_msg;
     $return = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     exit;
 }
Пример #6
0
 public function kuaiState()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_header['authorid']);
     $kdtype = trim($arr_body['kdtype']);
     $kdcode = trim($arr_body['kdcode']);
     $a = new Express();
     $arr_msg = $a->gethtmlorder($kdtype, $kdcode);
     //print_r($arr_msg);exit;
     $returnvalue = array($arr_msg);
     $retcode = "0";
     //反馈状态 0 成功 200 自定义错误
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #7
0
 public function authorFeedbck()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $fdcontent = u2g(trim($arr_body['fdcontent']));
     $fdlinkmethod = u2g(trim($arr_body['fdlinkmethod']));
     $fdcontent = str_replace("'", "‘", $fdcontent);
     $fdcontent = str_replace("¥", "¥", $fdcontent);
     //addslashes
     $query = "insert into tb_feedback (fd_feedback_authorid ,fd_feedback_content ,fd_feedback_linkman,\n\t          fd_feedback_datetime)values( '{$authorid}' ,'{$fdcontent}','{$fdlinkmethod}',now())";
     $db->query($query);
     $arr_message = array("error_id" => "0", "result" => "success", "message" => "感谢您的宝贵意见!");
     $retcode = "0";
     //反馈状态 0 成功 200 自定义错误
     $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;
 }
Пример #8
0
 public function modifyAuBkCardInfo()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $shoucardman = u2g(trim($arr_body['aushoucardman']));
     $shoucardphone = trim($arr_body['aushoucardphone']);
     $shoucardno = trim($arr_body['aushoucardno']);
     $shoucardbank = u2g(trim($arr_body['aushoucardbank']));
     $query = "select * from tb_author  where fd_author_id = '{$authorid}'  and fd_author_couponstate='1'";
     $db->query($query);
     if ($db->nf()) {
         $arr_message = array("result" => "failure", "message" => "银行卡资料已经审批,如需修改请联系客服!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
         $Error = array('result' => 'failure', 'retcode' => '200', 'retmsg' => $arr_message['message']);
         $arr_msg['msgbody'] = array("result" => "failure", "message" => "银行卡资料已经审批,如需修改请联系客服!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
         $returnvalue = array("msgbody" => $arr_msg['msgbody']);
         $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
         return $returnval;
         //$ErrorReponse->reponError($Error); //出错反馈
         //return false;
     }
     $query = "update tb_author set   fd_author_shoucardman = '{$shoucardman}',\n\t\t\t   fd_author_shoucardphone = '{$shoucardphone}',\n\t\t\t   fd_author_shoucardno='{$shoucardno}',\n\t\t\t   fd_author_shoucardbank='{$shoucardbank}',fd_author_couponstate = '0' where fd_author_id  = '{$authorid}' ";
     $db->query($query);
     $arr_msg['msgbody'] = array("error_id" => "0", "result" => "success", "message" => "恭喜您,我的银行卡修改成功!");
     $retcode = "0";
     //反馈状态 0 成功 200 自定义错误
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
 public function readAccglistdetail()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $acctypeid = trim($arr_body['acctypeid']);
     $authorid = trim($arr_channelinfo['authorid']);
     $msgstart = trim($arr_body['msgstart']) + 0;
     $msgdisplay = trim($arr_body['msgdisplay']) + 0;
     //echo var_dump($arr_body);
     $accyear = substr(trim($arr_body['accmonth']), 0, 4);
     $accmonth = str_replace($accyear, "", $arr_body['accmonth']);
     if ($acctypeid == 'coupon') {
         $wherequery1 = " and 1=2";
     }
     if ($acctypeid == 'recharge') {
         $wherequery2 = " and 1=2";
     }
     if ($msgdisplay == 0) {
         $msgdisplay = 100;
     }
     $paytype = '充值';
     $paytype = u2g($paytype);
     $paytype3 = '订单支付';
     $paytype3 = u2g($paytype);
     $paytype1 = '购买抵用券';
     $paytype1 = u2g($paytype1);
     $paystate = '交易完成';
     $paystate = u2g($paystate);
     $query = "select * from (select fd_accglist_bkordernumber as accglistno," . " case \n        when fd_accglist_paytype ='coupon' then '购买抵用券'\n        when fd_accglist_paytype ='creditcard' then '信用卡还款'" . "when fd_accglist_paytype ='recharge' then   '" . $paytype . "'" . "when fd_accglist_paytype ='pay' then       '还贷款'" . "when fd_accglist_paytype ='order' then '" . $paytype3 . "'" . "when fd_accglist_paytype ='tfmg' then '转账汇款'\n        else '其他业务' END  accgpaymode," . " \n\t\t\t\t                    fd_accglist_datetime as accglistdate , fd_accglist_id as  accglistid ,\n\t\t\t\t                    (fd_accglist_money) as accglistmoney,'" . $paystate . "' as accgstate,'' as accgtype,'' as accgmemo ," . " 'testbank' as accgcardbank,'testno' as accgcardno   \n\t\t\t\t\t\t\t        from tb_authoraccountglist where year(fd_accglist_datetime) = '{$accyear}' and \n\t\t\t\t\t\t\t\t\tmonth(fd_accglist_datetime) = '{$accmonth}' and fd_accglist_authorid='{$authorid}' {$wherequery1} \n\t\t\t\t              " . " union all  select fd_couponsale_bkordernumber as couponno,'" . $paytype1 . "' as accgpaymode ,fd_couponsale_datetime as coupondate," . "fd_couponsale_id as couponid, CONCAT_WS('=',CONCAT_WS('*',(fd_couponsale_money/fd_coupon_money),fd_coupon_money),fd_couponsale_money+0) as couponmoney,'" . $paystate . "','' as accgtype,'' as accgmemo ,'testbank' as accgcardbank,'testno' as accgcardno \n\t\t\t                from \n\t\t\t       tb_couponsale left join tb_coupon on fd_coupon_id =fd_couponsale_couponid where fd_couponsale_authorid = '{$authorid}' and fd_couponsale_payrq = '00' and fd_couponsale_isagentpay = '0'" . " and year(fd_couponsale_datetime) = '{$accyear}' and \n\t\t\t\t\t\t\t\t\tmonth(fd_couponsale_datetime) = '{$accmonth}' {$wherequery2}) as a order by accglistdate desc ";
     $db->query($query);
     $msgallcount = $db->nf();
     //$query = " $query  limit $msgstart,$msgdisplay ";
     //$db->query($query);
     $msgdiscount = $db->nf();
     //  echo $query;
     //  echo $query;
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     $arr_message = array("result" => "success", "message" => "读取成功!");
     $retcode = "0";
     //反馈状态 0 成功 200 自定义错误
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['msgallcount'] = $msgallcount;
     $arr_msg['msgbody']['msgdiscount'] = $msgdiscount + $msgstart;
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #10
0
 function authorReg()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $aumobile = trim($arr_body['aumobile']);
     $aupassword = trim(md5($arr_body['aupassword']));
     $autruename = u2g(trim($arr_body['autruename']));
     $auidcard = trim($arr_body['auidcard']);
     $auemail = trim($arr_body['auemail']);
     $query = "select 1 from tb_author  where fd_author_username = '******'";
     $db->query($query);
     if ($db->nf()) {
         $arr_message = array("result" => "failure", "message" => "该手机号码已注册");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
         $havemobile = 1;
     } else {
         $havemobile = 0;
     }
     if ($havemobile != 1) {
         $query = "insert into tb_author (fd_author_password ,fd_author_mobile ,fd_author_truename,\n\t\t\t\t\t\t\t          fd_author_idcard,fd_author_email ,fd_author_username,fd_author_regtime,fd_author_datetime \n\t\t\t\t\t\t\t          )values( '{$aupassword}' ,'{$aumobile}','{$autruename}','{$auidcard}','{$auemail}','{$aumobile}',now(),now())";
         $db->query($query);
         $listid = $db->insert_id();
         $sdcrid = 3;
         $auindustryid = 4;
         $slotpayfsetid = 8;
         $slotscdmsetid = 14;
         $bkcardpayfsetid = 25;
         $bkcardscdmsetid = 9;
         $memid = 3554;
         $shopid = 102;
         $authortypeid = 5;
         $query = "update tb_author set \n\t\t\t\t\t   fd_author_isstop='0'," . "fd_author_state = '9'," . "fd_author_sdcrid = '{$sdcrid}'," . "fd_author_auindustryid = '{$auindustryid}',\n\t\t               fd_author_slotpayfsetid = '{$slotpayfsetid}',\n\t\t               fd_author_slotscdmsetid = '{$slotscdmsetid}',\n\t\t\t\t\t   fd_author_bkcardpayfsetid='{$bkcardpayfsetid}',\n\t\t\t\t\t   fd_author_bkcardscdmsetid='{$bkcardscdmsetid}' ,\n\t\t\t\t\t   fd_author_couponstate      = 0   ," . "fd_author_memid          = '{$memid}'," . "fd_author_shopid         = '{$shopid}'," . "fd_author_authortypeid   = '{$authortypeid}' \n\t\t\t\t\t   \t\t\t\t\t\t\n\t\t\t\t\t   where fd_author_id='{$listid}'";
         $db->query($query);
         $arr_message = array("result" => "success", "message" => "恭喜您,注册成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     }
     $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;
 }
 public function DefaultKuaibkcard()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $bkcardid = trim($arr_body['bkcardid']);
     $bkcardisdefault = trim($arr_body['bkcardisdefault']);
     if ($bkcardisdefault == 1) {
         $query = "UPDATE tb_author_quickpaycard SET fd_bkcardisdefault = 0 WHERE fd_bkauthorid = " . $authorid;
         $db->query($query);
     }
     $query = "UPDATE tb_author_quickpaycard SET fd_bkcardisdefault = '{$bkcardisdefault}' WHERE fd_bkcardid = " . $bkcardid;
     $db->query(auto_charset($query, 'utf-8', 'gbk'));
     $retcode = "0";
     $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;
 }
Пример #12
0
 public function readOrderlist()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     //$paycardid = trim(GetPayCalcuInfo::readpaycardid($arr_body['paycardid'])); //插卡器
     $authorid = trim($arr_channelinfo['authorid']);
     //操作者
     $msgstart = trim($arr_body['msgstart']) + 0;
     $msgdisplay = trim($arr_body['msgdisplay']) + 0;
     $paytype = trim($arr_body['paytype']);
     $arr_state = array("请求交易", "交易成功", "交易取消", "无效状态");
     // $arr_state = auto_charset($arr_state, 'utf-8', 'gbk');
     $arr_orderstate = array("订单处理", "确认收款", "已发货", "已完成");
     $arr_state = auto_charset($arr_state, 'utf-8', 'gbk');
     $arr_orderstate = auto_charset($arr_orderstate, 'utf-8', 'gbk');
     if ($msgstart < 0) {
         $msgstart = 0;
     }
     $query = "select  1 from  tb_orderglist where  fd_orderlist_authorid = '{$authorid}' and" . "  (fd_orderlist_payrq = '00' )";
     $db->query($query);
     $msgallcount = $db->nf();
     $query = "select fd_orderlist_bkordernumber as orderno,\n                fd_orderlist_produrename as orderprodurename,\n\t\t\t\t  fd_orderlist_num as ordernum,\n\t\t\t\t   fd_orderlist_price as orderprice,\n\t\t\t\t   fd_orderlist_ordermoney as  ordermoney,\n\t\t\t\t   fd_orderlist_promoney as  promoney,\n\t\t\t\t   fd_orderlist_yunmoney as  yunmoney,\n\t\t\t\t   fd_orderlist_shaddress as ordershaddress,\n\t\t\t\t   fd_orderlist_shman as ordershman,\n\t\t\t\t   fd_orderlist_wlno as wlno,\n\t\t\t\t   fd_orderlist_wlcompanyid as kdcomanyid,\n\t\t\t\t  fd_orderlist_shphone as ordershphone,case\n                when fd_orderlist_payrq ='01' then '" . $arr_state[0] . "'\n        when fd_orderlist_payrq ='00' then '" . $arr_state[1] . "'" . "when fd_orderlist_payrq ='03' then '" . $arr_state[2] . "'\n        else '" . $arr_state[4] . "' END  orderpaystatus ,case\n        when fd_orderlist_state ='0' then '" . $arr_ofstate[0] . "'\n        when fd_orderlist_state ='1' then '" . $arr_ofstate[1] . "'" . "when fd_orderlist_state ='2' then '" . $arr_ofstate[2] . "'\n        else '" . $arr_ofstate[3] . "' END  orderstate from  tb_orderglist where\n\t\t\t\t\t\t\t\t\t fd_orderlist_authorid = '{$authorid}'\n\t\t\t\tand  (fd_orderlist_payrq = '00') order by fd_orderlist_id desc limit {$msgstart},{$msgdisplay} ";
     $db->query($query);
     $msgdiscount = $db->nf();
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     if (!$arr_msg) {
         $arr_message = array("result" => "failure", "message" => "没有数据!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $arr_message = array("result" => "success", "message" => "读取成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['msgallcount'] = $msgallcount;
     $arr_msg['msgbody']['msgdiscount'] = $msgdiscount + $msgstart;
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #13
0
	function getOrderHistory()
	{
		$data = array();
		$data[] = array("departCity" => "北京", "arriveCity" => "上海", "createOrderTime" => "2013-05-20T07:55:00", "takeOffTime" => "2014-05-20T07:55:00", "flight" => "CA012", "craftType" => "77A", "totalPrice" => "1246.25", "status" => "订单完成");
		$data[] = array("departCity" => "北京", "arriveCity" => "广州", "createOrderTime" => "2013-05-20T07:55:00", "takeOffTime" => "2014-05-20T07:55:00", "flight" => "CA12", "craftType" => "320", "totalPrice" => "1246.25", "status" => "订单完成");
		$arr_msg['msgbody'] = $data;
		$retcode = "0";
		$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;
		
		// 从订单表和订单详情表中获取数据
	}
 function reponError($Error)
 {
     $arr = array('msgbody' => array('result' => 'failure', 'message' => $Error['retmsg']));
     $returnval = TfbxmlResponse::ResponsetoApp($Error['retcode'], $arr);
     echo $returnval;
     exit;
 }
Пример #15
0
 public function readshoucardList()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $paytype = trim($arr_body['paytype']);
     $authorid = trim($arr_channelinfo['authorid']);
     //操作者
     //$appversion = trim($arr_body['appversion']);
     $query = "select ''  as shoucardid,fd_bank_id  as bankid,fd_agpm_shoucardno as shoucardno,fd_agpm_shoucardbank as shoucardbank,fd_agpm_shoucardman as shoucardman,fd_agpm_shoucardmobile as shoucardmobile, '" . $paytype . "' as paytype from \n\t\t\t      tb_agentpaymoneylist left join tb_bank on fd_bank_name = fd_agpm_shoucardbank where fd_agpm_paytype = '{$paytype}' and fd_agpm_authorid = '{$authorid}'  and fd_agpm_shoucardno <>'' group by fd_agpm_shoucardno,fd_agpm_shoucardbank, fd_agpm_shoucardman,fd_agpm_shoucardmobile";
     //只显示激活的银行列表
     $db->query($query);
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     if (!$arr_msg) {
         $arr_message = array("result" => "failure", "message" => "银行账户历史记录为空!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $arr_message = array("result" => "success", "message" => "读取成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     }
     $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;
 }
Пример #16
0
 public function orderPayFeedback()
 {
     $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'])); //刷卡器key
     $authorid = trim($arr_channelinfo['authorid']);
     //authorid
     $result = trim($arr_body['result']);
     $nowdate = date("Y-m-d H:i:s");
     if ($result == 'success') {
         //$query = "update tb_orderpayglist set fd_oplist_payrq ='00',fd_oplist_paydate = '$nowdate' where fd_oplist_bkntno = '$bkntno'";
         //$db->query($query);
         //$query = "update  tb_agentpaymoneylist set fd_agpm_payrq = '00'  where fd_agpm_bkntno = '$bkntno'";
         //$db->query($query);
         //echo $query;
         $arr_message = array("result" => "success", "message" => "支付成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $arr_message = array("result" => "failure", "message" => "支付失败!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     }
     $returnvalue = array("msgbody" => array('result' => $arr_message['result'], "message" => $arr_message['message']));
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #17
0
 public function getOrderHistory()
 {
     $retcode = "200";
     $arr_message = array("result" => "fail", "message" => "操作出现异常,请稍后再试!");
     $authorid = trim($this->arr_channelinfo['authorid']);
     if ($authorid > 0) {
         $arr_body = $this->arr_body;
         $start = intval(trim($arr_body['msgstart']));
         $start = $start > 0 ? $start : 0;
         $count = intval(trim($arr_body['msgdisplay']));
         $count = $count > 0 ? $count : 8;
         $db = new DB_test();
         $query = "SELECT fd_grclist_bkntno AS bkntno, fd_grclist_gameuserid AS account, fd_grclist_gamecardnum AS quantity, fd_grclist_gamename AS gamename, fd_grclist_state, fd_grclist_paymoney AS totalPrice, fd_grclist_datetime AS completeTime FROM tb_gamerechargelist WHERE fd_grclist_authorid = {$authorid} AND fd_grclist_state = 1 LIMIT {$start}, {$count}";
         $db->query($query);
         $retcode = "0";
         if ($db->nf() > 0) {
             $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
             $arr_message = array("result" => "success", "message" => "获取成功");
         } else {
             $arr_message = array("result" => "success", "message" => "没有数据");
         }
     } else {
         $arr_message = array("result" => "fail", "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;
 }
Пример #18
0
 public function couponSalelist()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = $arr_channelinfo['authorid'];
     $msgstart = trim($arr_body['msgstart']) + 0;
     $msgdisplay = trim($arr_body['msgdisplay']) + 0;
     if ($msgdisplay == 0) {
         $msgdisplay = 100;
     }
     $query = "select fd_couponsale_bkordernumber as couponno,CONCAT_WS('=',CONCAT_WS('*',(fd_couponsale_money/fd_coupon_money),fd_coupon_money),fd_couponsale_money+0) as couponmoney " . ",\n\t\t\t                 fd_couponsale_datetime as coupondate,fd_couponsale_paycardid as paycardid,\n\t\t\t\t\t\t\t fd_couponsale_id as couponid ,fd_couponsale_memo as couponmemo,fd_couponsale_creditcardbank as couponbank,fd_couponsale_creditcardno as couponcardno from \n\t\t\t       tb_couponsale left join tb_coupon on fd_coupon_id =fd_couponsale_couponid where fd_couponsale_authorid = '{$authorid}' and fd_couponsale_payrq = '00' order by fd_couponsale_datetime desc ";
     //只显示购买的抵用券历史
     $db->query($query);
     $msgallcount = $db->nf();
     $query = " {$query} limit {$msgstart},{$msgdisplay}";
     $db->query($query);
     $msgdiscount = $db->nf();
     //echo $query;
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     //echo var_dump($arr_msg);
     if ($arr_msg == "") {
         $arr_message = array("result" => "failure", "message" => "还没有优惠券记录!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $arr_message = array("result" => "success", "message" => "读取抵用券列表成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['msgallcount'] = $msgallcount;
     $arr_msg['msgbody']['msgdiscount'] = $msgdiscount + $msgstart;
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #19
0
	public function GetOrderList()
	{
		$retcode = "0";
		
		$arr_msg['msgbody']['result'] = "success";
		$arr_msg['msgbody']['message'] = "获取成功";
		
		$returnvalue = array ("msgbody" => $arr_msg['msgbody']);
		$returnval = TfbxmlResponse :: ResponsetoApp($retcode, $returnvalue);
		
		return $returnval;
	}
Пример #20
0
 public function payagentfenrunlistdetail()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     //$paycardid = trim(GetPayCalcuInfo::readpaycardid($arr_body['paycardid'])); //插卡器
     $authorid = trim($arr_channelinfo['authorid']);
     //操作者
     $agentid = trim($arr_channelinfo['agentid']);
     //代理商id
     $querytype = trim($arr_body['querytype']);
     //支付类型id
     $querywhere = trim($arr_body['querywhere']);
     //充值金额
     $appfunid = trim($arr_body['appfunid']);
     //充值金额
     $querywhere1 = " and fd_frlist_paydate like '%{$querywhere}%'";
     $query = "select fd_amtype_id as appfunid, fd_appmnu_name as appfunname,\n                 sum(fd_frlist_paymoney) as paymoney,sum(fd_frlist_payfee) as payfee,sum(fd_frlist_cusfee) as fenrun\n             from tb_cus_fenrunglist left  join tb_appmenu on fd_appmnu_no = fd_frlist_paytype\n             left join tb_appmenutype on fd_amtype_id = fd_appmnu_amtypeid\n               where fd_frlist_payrq = '00' and fd_frlist_sdcrid<100\n              {$querywhere1} and fd_frlist_cusid = '{$agentid}' and fd_appmnu_amtypeid = '{$appfunid}'\n              group by fd_appmnu_amtypeid order by\n              fd_appmnu_id\n     ";
     $db->query($query);
     $query = "select fd_amtype_id as appfunid, fd_appmnu_name as appfunname,\n                 sum(fd_frlist_paymoney) as paymoney,sum(fd_frlist_payfee) as payfee,sum(fd_frlist_cusfee) as fenrun\n             from tb_cus_fenrunglist left  join tb_appmenu on fd_appmnu_no = fd_frlist_paytype\n             left join tb_appmenutype on fd_amtype_id = fd_appmnu_amtypeid\n               where fd_frlist_payrq = '00' and fd_frlist_sdcrid<100\n              {$querywhere1} and fd_frlist_cusid = '{$agentid}' and fd_appmnu_amtypeid = '{$appfunid}'\n              group by fd_appmnu_id order by\n              fd_appmnu_id\n     ";
     $db->query($query);
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     if (!$arr_msg) {
         $arr_message = array("result" => "failure", "message" => "没有数据!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $arr_message = array("result" => "success", "message" => "读取成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['totalfenrun'] = 0;
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #21
0
 public function readQQRechangelist()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     //$paycardid = trim(GetPayCalcuInfo::readpaycardid($arr_body['paycardid'])); //插卡器
     $authorid = trim($arr_channelinfo['authorid']);
     //操作者
     $msgstart = trim($arr_body['msgstart']) + 0;
     $msgdisplay = trim($arr_body['msgdisplay']) + 0;
     $paytype = trim($arr_body['paytype']);
     $arr_state = array("请求交易", "交易成功", "交易取消", "无效状态");
     // $arr_state = auto_charset($arr_state, 'utf-8', 'gbk');
     $arr_ofstate = array("充值成功", "正在充值", "充值失败", "充值失败");
     $arr_state = auto_charset($arr_state, 'utf-8', 'gbk');
     $arr_ofstate = auto_charset($arr_ofstate, 'utf-8', 'gbk');
     if ($msgstart < 0) {
         $msgstart = 0;
     }
     $query = "select  1 from  tb_qqrechargelist where  fd_mrclist_authorid = '{$authorid}' and" . "  (fd_mrclist_payrq = '00' )";
     $db->query($query);
     $msgallcount = $db->nf();
     $query = "select fd_mrclist_bkordernumber as listno,\n                fd_mrclist_rechamoney as rechamoney,\n\t\t\t\t  fd_mrclist_paymoney as rechapaymoney,\n\t\t\t\t   fd_mrclist_qqprov as rechaqqprov,\n\t\t\t\t   fd_mrclist_bankcardno as  rechabkcardno,\n\t\t\t\t   fd_mrclist_paydate as rechadatetime,\n\t\t\t\t   fd_mrclist_state as rechastate,\n\t\t\t\t  fd_mrclist_qq as rechaqq,case\n        when fd_mrclist_payrq ='01' then '" . $arr_state[0] . "'\n        when fd_mrclist_payrq ='00' then '" . $arr_state[1] . "'" . "when fd_mrclist_payrq ='03' then '" . $arr_state[2] . "'\n        else '" . $arr_state[4] . "' END  state ,case\n        when fd_mrclist_ofstate ='1' then '" . $arr_ofstate[0] . "'\n        when fd_mrclist_ofstate ='-1' then '" . $arr_ofstate[1] . "'" . "when fd_mrclist_ofstate ='1007' then '" . $arr_ofstate[2] . "'\n        else '" . $arr_ofstate[3] . "' END  ofstate from  tb_qqrechargelist where\n\t\t\t\t\t\t\t\t\t fd_mrclist_authorid = '{$authorid}'\n\t\t\t\tand  (fd_mrclist_payrq = '00') order by fd_mrclist_id desc limit {$msgstart},{$msgdisplay} ";
     $db->query($query);
     $msgdiscount = $db->nf();
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     if (!$arr_msg) {
         $arr_message = array("result" => "failure", "message" => "没有数据!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
     } else {
         $arr_message = array("result" => "success", "message" => "读取成功!");
         $retcode = "0";
         //反馈状态 0 成功 200 自定义错误
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['msgallcount'] = $msgallcount;
     $arr_msg['msgbody']['msgdiscount'] = $msgdiscount + $msgstart;
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
 public function ReadMobileRechangeList()
 {
     $authorId = trim($this->arr_channelinfo['authorid']);
     // 用户ID
     if ($authorId == "") {
         ErrorReponse::reponError(array('retcode' => '200', 'retmsg' => '用户信息异常'));
     }
     $pageStart = trim($this->arr_body['msgstart']) + 0;
     $pageCount = trim($this->arr_body['msgdisplay']) + 0;
     $pageCount = $pageCount > 0 ? $pageCount : 8;
     $query = "SELECT fd_mrclist_rechamoney AS rechamoney, fd_mrclist_paymoney AS rechapaymoney, \n\t\t\t\tfd_mrclist_mobileprov AS rechamobileprov,  fd_mrclist_bankcardno AS rechabkcardno, \n\t\t\t\tfd_mrclist_paydate AS rechadatetime, fd_mrclist_rechaphone AS rechamobile \n\t\t\t\tFROM tb_mobilerechargelist \n\t\t\t\tWHERE fd_mrclist_authorid = '{$authorId}' AND fd_mrclist_payrq = '00' \n\t\t\t\tORDER BY fd_mrclist_paydate DESC LIMIT {$pageStart}, {$pageCount}";
     $db = new DB_test();
     $db->query($query);
     $msgBody = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     if (!$msgBody) {
         $arr_message = array("result" => "fail", "message" => "您还未使用过手机充值业务!");
         $retcode = "200";
     } else {
         $arr_message = array("result" => "success", "message" => "");
         $retcode = "0";
     }
     $msgBody['msgbody']['result'] = $arr_message['result'];
     $msgBody['msgbody']['message'] = $arr_message['message'];
     $returnvalue = array("msgbody" => $msgBody['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #23
0
 public function PayWithVerifyCode()
 {
     $now = time();
     $logger = Logger::getLogger('transfermoney');
     $logger->debug("开始使用验证码进行验证后充值({$now})");
     $authorId = trim($this->arr_channelinfo['authorid']);
     // 用户ID
     $msgBody = $this->arr_body;
     foreach ($msgBody as $key => $value) {
         $msgBody[$key] = trim($value);
     }
     // 必填的字段
     $requiredField = array("orderId", "verifyCode");
     foreach ($requiredField as $key => $value) {
         if ($msgBody[$value] == "") {
             ErrorReponse::reponError(array('retcode' => '200', 'retmsg' => '用户输入信息不完整'));
         }
     }
     $logger->info("正在使用验证码进行验证后充值({$now}) : 输入的信息包括" . print_r($msgBody, true));
     $cardInfo = array("orderId" => $msgBody['orderId'], "verifyCode" => $msgBody['verifyCode']);
     $payResult = YiBaoPay::PayWithVerifyCode($cardInfo);
     $logger->info("完成易宝支付({$now}), 返回的结果" . print_r($payResult, true));
     TransferMoney::YiBaoPayFeedback($payResult, $msgBody['orderId']);
     if ($payResult['r1_Code'] == "1") {
         $retcode = "0";
         $arr_message = array("result" => "success", "message" => "支付成功,正在为您转账中");
     } else {
         $retcode = "200";
         $arr_message = array("result" => "fail", "message" => $payResult['errorMsg']);
     }
     $arr_msg["msgbody"]['result'] = $arr_message['result'];
     $arr_msg["msgbody"]['message'] = $arr_message['message'];
     $logger->info("完成使用验证码进行验证后充值({$now}) : 返回的信息包括" . print_r($arr_msg["msgbody"], true));
     $returnvalue = array("msgbody" => $arr_msg["msgbody"]);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
Пример #24
0
 public function authorMenuCount()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $appmnuid = $arr_body['appmnuid'];
     $authorid = $arr_channelinfo['authorid'];
     $query = "select fd_appmnuc_count as count from tb_appmenucout where fd_appmnuc_authorid = '{$authorid}'\n                and fd_appmnuc_appmnuid = '{$appmnuid}' ";
     $db->query($query);
     if ($db->nf()) {
         $arr_val = $db->get_one($query);
         $count = $arr_val['count'];
         $querywhere = "  fd_appmnuc_authorid = '{$authorid}'\n                and fd_appmnuc_appmnuid = '{$appmnuid}'";
         $dateArray['fd_appmnuc_count'] = $count + 1;
         $db->update("tb_appmenucout", $dateArray, $querywhere);
     } else {
         $dateArray['fd_appmnuc_authorid'] = $authorid;
         $dateArray['fd_appmnuc_appmnuid'] = $appmnuid;
         $dateArray['fd_appmnuc_count'] = $memo;
         $db->insert("tb_appmenucout", $dateArray);
     }
     $listid = $db->insert_id();
     //取出刚插入的记录的主关键值的id
     $arr_message = array("result" => "success", "message" => "插入数据成功!", "retcode" => "0");
     $retcode = "0";
     //反馈状态 0 成功 200 自定义错误
     $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;
 }
Пример #25
0
 public function payCardCheck()
 {
     global $arr_limitauthorid;
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $paycardkey = $arr_body['paycardkey'];
     $authorid = $arr_channelinfo['authorid'];
     /*2014-06-18 取消商户对刷卡器的限制 */
     $paycardkey = strtolower($paycardkey);
     $paycardkey = str_replace("fff", "", $paycardkey);
     //$paycardid = trim(GetPayCalcuInfo::readpaycardid($arr_body['paycardkey'])); //刷卡器设备号
     $arr_paycard = GetPayCalcuInfo::readpaycardid($arr_body['paycardkey'], $authorid);
     //刷卡器设备号
     $paycardid = $arr_paycard['paycardid'];
     //刷卡器id
     $cusid = trim($arr_paycard['cusid']);
     //代理商
     $paycardkey = trim($arr_paycard['paycardkey']);
     //刷卡器key
     AgentPayglist::savePayCardinfo($paycardid);
     //保存最新刷卡时间
     $arr_message = array("result" => "success", "message" => "刷卡器检验成功!");
     $retcode = "0";
     //反馈状态 0 成功 200 自定义错误
     $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);
     /*---end ---   */
     $query = "select fd_paycard_authorid as pauthorid from tb_paycard where   fd_paycard_key = '{$paycardkey}'  ";
     $arr_authid = $db->get_one($query);
     //		if(in_array($authorid, $arr_limitauthorid))
     //			{
     //		if($arr_authid['pauthorid']!=$authorid && $arr_authid['pauthorid']>0)
     //		{
     //			$Error = array (
     //				'result' => 'failure',
     //				'retcode' => '200',
     //				'retmsg' => '该刷卡器已被其他商户使用,您不允许使用!'
     //			);
     //			$this->ErrorReponse->reponError($Error); //出错反馈
     //			exit;
     //
     //		}
     //			}
     $query = "select fd_paycard_id,fd_paycard_active,fd_paycard_posstate from tb_paycard where fd_paycard_key = '{$paycardkey}'  ";
     $db->query($query);
     //echo $query;
     if ($db->nf()) {
         $db->next_record();
         $paycardid = $db->f(fd_paycard_id);
         $posstate = $db->f(fd_paycard_posstate);
         //0 停用 1 警告 2启用 3 冻结
         $paycardactive = $db->f(fd_paycard_active);
         //0 停用 1 警告 2启用 3 冻结
         if ($paycardactive == 0) {
             $arr_message = array("result" => "failure", "message" => "请先激活刷卡器!");
             $retcode = "200";
             //反馈状态 0 成功 200 自定义错误
         } else {
             $arr_message = array("result" => "success", "message" => "刷卡器检验成功!");
             $retcode = "0";
             //反馈状态 0 成功 200 自定义错误
         }
         if ($posstate == '3' || $posstate == '0') {
             $arr_message = array("result" => "failure", "message" => "该刷卡器被冻结或者停用!");
             $retcode = "200";
             //反馈状态 0 成功 200 自定义错误
         }
     } else {
         $arr_message = array("result" => "failure", "message" => "刷卡失败,请先激活刷卡器!");
         $retcode = "200";
         //反馈状态 0 成功 200 自定义错误
         if (!in_array($authorid, $arr_limitauthorid)) {
             $arr_message = array("result" => "success", "message" => "刷卡器验证通过!");
             $retcode = "0";
             //反馈状态 0 成功 200 自定义错误
         }
     }
     $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;
 }
Пример #26
0
 public function getOrderHistory()
 {
     $retcode = "200";
     $arr_message = array("result" => "fail", "message" => "操作出现异常,请稍后再试!");
     $authorid = trim($this->arr_channelinfo['authorid']);
     if ($authorid > 0) {
         $arr_body = $this->arr_body;
         $start = intval(trim($arr_body['msgstart']));
         $start = $start > 0 ? $start : 0;
         $count = intval(trim($arr_body['msgdisplay']));
         $count = $count > 0 ? $count : 8;
         $db = new DB_test();
         $query = "SELECT A.fd_union_pay_number AS bkntno, A.fd_pro_id AS proId, \n\t\t\t\t\t(A.fd_fact_bill / 100) AS factNumber, (A.fd_total_bill / 100) AS payNumber, IF(A.fd_order_state = 3, 0, 1) AS status, B.fd_company_name AS company, \n\t\t\t\t\tA.fd_complete_time AS completeTime FROM tb_utility_order AS A JOIN tb_utility_product AS B ON A.fd_pro_id = B.fd_company_id \t\n\t\t\t\t\tWHERE A.fd_author_id = {$authorid} AND (A.fd_order_state = 2 || A.fd_order_state = 3) LIMIT {$start}, {$count}";
         $db->query($query);
         $retcode = "0";
         if ($db->nf() > 0) {
             $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
             $arr_message = array("result" => "success", "message" => "获取成功");
         } else {
             $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;
 }
Пример #27
0
 public function authorPwdModify()
 {
     $logger = Logger::getLogger('AuthorInfo');
     $logger->debug("开始修改密码");
     $authorid = $this->arr_channelinfo['authorid'];
     $logger->debug("传入的authorid为(" . $authorid . ")");
     $arr_body = $this->arr_body;
     $auoldpwd = trim($arr_body['auoldpwd']);
     $logger->debug("传入的auoldpwd为(" . $auoldpwd . ")");
     $auoldpwd = md5($auoldpwd);
     $aunewpwdRaw = trim($arr_body['aunewpwd']);
     $logger->debug("传入的aunewpwd为(" . $auoldpwd . ")");
     $aunewpwd = md5($aunewpwdRaw);
     $aumoditype = trim($arr_body['aumoditype']);
     $logger->debug("传入的aumoditype为(" . $aumoditype . ")");
     $reset = trim($arr_body['reset']);
     $logger->debug("传入的reset为(" . $reset . ")");
     $retcode = 200;
     $arr_message = array("result" => "failure", "message" => "操作出现异常,请稍后再试!");
     if ($authorid != "" && $aunewpwdRaw != "") {
         if ($aumoditype == 1) {
             // 修改手势密码
             if ($reset == 1) {
                 if ($this->resetGuestPassword($authorid, $aunewpwd)) {
                     $retcode = "0";
                     $arr_message = array("result" => "success", "message" => "手势密码修改成功");
                 }
             } else {
                 if ($aunewpwd == $auoldpwd) {
                     $arr_message = array("result" => "failure", "message" => "新密码不能等于旧密码!");
                 } else {
                     if ($this->changeGuestPawdUsingOld($authorid, $aunewpwd, $auoldpwd)) {
                         $retcode = "0";
                         $arr_message = array("result" => "success", "message" => "手势密码修改成功");
                     } else {
                         $arr_message = array("result" => "failure", "message" => "帐号或者密码错误!");
                     }
                 }
             }
         } else {
             if ($aumoditype == 2) {
                 // 修改登录密码
                 if ($reset == 1) {
                     if ($this->resetPayPassword($authorid, $aunewpwd)) {
                         $retcode = "0";
                         $arr_message = array("result" => "success", "message" => "登录密码修改成功");
                     }
                 } else {
                     if ($aunewpwd == $auoldpwd) {
                         $arr_message = array("result" => "failure", "message" => "新密码不能等于旧密码!");
                     } else {
                         if ($this->changePayPawdUsingOld($authorid, $aunewpwd, $auoldpwd)) {
                             $retcode = "0";
                             $arr_message = array("result" => "success", "message" => "登录密码修改成功");
                         } else {
                             $arr_message = array("result" => "failure", "message" => "帐号或者密码错误!");
                         }
                     }
                 }
             }
         }
     } else {
         $arr_message = array("result" => "failure", "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;
 }