Exemplo n.º 1
0
 public function alipay_return($pay_id)
 {
     $alipay = new \Common\Util\Alipay\Alipay();
     // 必需验证,否则直接伪造请求过来,系统就当做是付了钱了
     $alipay->verifyReturn() or $this->error('支付请求验证失败,请重新检查!');
     $_GET['trade_status'] == 'TRADE_FINISHED' or $_GET['trade_status'] == 'TRADE_SUCCESS' or $this->error('支付结果异常[' . $_GET['trade_status'] . '],请重新检查!');
     $ret = $this->_paySuccess($pay_id, $_GET['total_fee'], $_GET['trade_no']);
     $ret === true or $this->error($ret);
     // 根据不同的支付,跳到不同的页面
     $payRow = M('loan_pay_alipay')->find($pay_id);
     if ($payRow['issue'] > 0 && $payRow['month'] == 1) {
         $this->redirect('/user/bill');
     } else {
         $this->redirect('/user/order');
     }
 }
Exemplo n.º 2
0
 public function alipay_return($pay_id)
 {
     $alipay = new \Common\Util\Alipay\Alipay();
     // 必需验证,否则直接伪造请求过来,系统就当做是付了钱了
     unset($_GET['pay_id']);
     $alipay->verifyReturn() or $this->error('支付请求验证失败,请重新检查!');
     $_GET['trade_status'] == 'TRADE_FINISHED' or $_GET['trade_status'] == 'TRADE_SUCCESS' or $this->error('支付结果异常[' . $_GET['trade_status'] . '],请重新检查!');
     $ret = $this->_paySuccess($pay_id);
     $ret === true or $this->error($ret);
     $this->redirect('/wallet/');
 }