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

支付宝

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