...
|
...
|
@@ -77,7 +77,7 @@ class OrderController extends HomeBaseController{ |
|
|
];
|
|
|
try{
|
|
|
Db::startTrans();
|
|
|
Db::name('users')->where('users_id',$users_id)->update(['is_use'=>0,'order_no'=>null]);
|
|
|
Db::name('users')->where('id',$users_id)->update(['is_use'=>0,'order_no'=>null]);
|
|
|
Db::name('order')->where('order_no',$users['order_no'])->update($data);
|
|
|
}catch (\Exception $exception){
|
|
|
Db::rollback();
|
...
|
...
|
@@ -124,7 +124,7 @@ class OrderController extends HomeBaseController{ |
|
|
*/
|
|
|
public function pay($order_no){
|
|
|
$order=Db::name('order')->where(['order_no'=>$order_no,'state'=>2])->find();
|
|
|
$openId=Db::name('users')->where('users_id',$order['users_id'])->find()['open_id'];
|
|
|
$openId=Db::name('users')->where('id',$order['users_id'])->find()['open_id'];
|
|
|
$body='支付';
|
|
|
$price=$order['price']*100;//订单价格
|
|
|
$notify_url=url('order/notify','','',true);//回调地址
|
...
|
...
|
|