作者 lihan
1 个管道 的构建 通过 耗费 0 秒

支付宝

@@ -167,7 +167,8 @@ class OrderController extends HomeBaseController @@ -167,7 +167,8 @@ class OrderController extends HomeBaseController
167 $this->success('微信支付', url('user/Center/orderDetail', ['oid' => $oid]), $this->wxPay($info)); 167 $this->success('微信支付', url('user/Center/orderDetail', ['oid' => $oid]), $this->wxPay($info));
168 } //支付宝支付 168 } //支付宝支付
169 elseif ($data['payment'] == 2) { 169 elseif ($data['payment'] == 2) {
170 - $this->alipay('201810182015', '购买', 0.01, '商品'); 170 + echo json_encode(['msg'=>'支付宝', 'url'=>url('order/Order/alipay',['oid'=>$oid]), 'code'=>20000]);
  171 + exit();
171 } //余额支付 172 } //余额支付
172 elseif ($data['payment'] == 0) { 173 elseif ($data['payment'] == 0) {
173 $model = new OrderModel; 174 $model = new OrderModel;
@@ -786,7 +786,9 @@ @@ -786,7 +786,9 @@
786 window.location.href=data.url; 786 window.location.href=data.url;
787 } 787 }
788 }else { 788 }else {
789 - 789 + if(data.code == 20000) {
  790 + window.location.href=data.url;
  791 + }
790 } 792 }
791 } 793 }
792 }) 794 })