Ejemplo n.º 1
0
 public function moneymmcharge()
 {
     import("ORG.Loan.Escrow");
     $charge = new Escrow();
     $data = M('escrow_account')->field('*')->where('uid=' . $this->uid)->find();
     if (!$data) {
         $this->error('请先绑定托管账户', '/member/bank#fragment-2');
     }
     $add = array('uid' => $this->uid, 'add_time' => time(), 'money' => $_POST['money']);
     $id = M("member_payonline")->add($add);
     //利用返回id 查找表自动生成的 orderno(平台充值单号)
     if (!$id) {
         $this->error('订单生成出错!');
     }
     $orders = date("YmdHi") . $id;
     $Amount = floatval($_POST['money']);
     $ReturnURL = 'http://' . $_SERVER['HTTP_HOST'] . U('/member/charge/wapchargeReturn');
     $NotifyURL = 'http://' . $_SERVER['HTTP_HOST'] . U("/member/Notify/charge");
     $RechargeType = '2';
     $FeeType = '1';
     //dump($data['platform_marked']);die;
     $array = $charge->Moneymoremorecharge($data['qdd_marked'], $data['platform_marked'], $orders, $Amount, $ReturnURL, $NotifyURL, $RechargeType, $FeeType);
     file_put_contents("C:\\www\tsx\\App\\Runtime\\a.txt", json_encode($array));
     $form = $charge->setForm($array, 'charge');
     echo $form;
     exit;
 }