示例#1
0
 /**
  * 转账返回地址
  * 
  */
 public function returnUrl()
 {
     import("ORG.Loan.Escrow");
     $loan = new Escrow();
     if ($loan->loanVerify($_POST)) {
         $lang = L('invest');
         $msg = $lang[$_POST['ResultCode']];
         if ($_POST['ResultCode'] != 88) {
             $this->error($_POST['Message'], U('index'));
         } else {
             $this->success('转账成功', U('index'));
             exit;
         }
     }
     $msg = "返回信息被篡改";
     $this->error($msg, U('index'));
 }
示例#2
0
 /**
  **	 转账
  **
  **/
 public function transfer()
 {
     import("ORG.Loan.Escrow");
     $loan = new Escrow();
     if ($loan->loanVerify($_POST) && $_POST['ResultCode'] == 88) {
         if (empty($_POST['Action'])) {
             //空为冻结 暂不处理
             notifyMsg('转账冻结', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
             echo "SUCCESS";
             exit;
         } elseif (intval($_POST['Action']) == 1) {
             $loan_list = json_decode(urldecode($_POST['LoanJsonList']), true);
             isset($loan_list[0]) ? $transfer_info = $loan_list[0] : ($transfer_info = $loan_list);
             $orders = $transfer_info['OrderNo'];
             $transfer = M('transfer')->field('status, loanno, uid')->where("orders='{$orders}'")->find();
             if ($transfer['status'] != 1) {
                 $arr['status'] = 1;
                 $arr['loanno'] = $transfer_info['LoanNo'];
                 if (M('transfer')->where("orders='{$orders}'")->save($arr)) {
                     if (membermoneylog($transfer['uid'], 7, $transfer_info['Amount'], $transfer_info['Remark'], 0, "@网站管理员@")) {
                         notifyMsg('转账', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
                         echo "SUCCESS";
                         exit;
                     } else {
                         $arr['status'] = 0;
                         //$arr['loanno'] = $transfer['LoanNo'];
                         M('transfer')->where("orders='{$orders}'")->save($arr);
                         notifyMsg('转账', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'ERROR');
                     }
                 }
             }
         }
         notifyMsg('转账', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '');
     }
 }
示例#3
0
 /**
  * 企业直投还款
  * 
  */
 public function edetail()
 {
     if ($_POST['ResultCode'] == '88') {
         import("ORG.Loan.Escrow");
         $loan = new Escrow();
         if ($loan->loanVerify($_POST)) {
             if (intval($_POST['Action']) == 1) {
                 $info = explode("_", $_POST['Remark1']);
                 if (repaymentEnterprise($info[0], $info[1]) == 'TRUE') {
                     notifyMsg('直投还款', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
                     echo 'SUCCESS';
                     exit;
                 }
             } else {
                 notifyMsg('直投还款冻结', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
                 echo 'SUCCESS';
                 exit;
             }
             notifyMsg('直投还款', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '');
         }
     }
 }