mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
be37bcb3bf
commit
78673af6e8
@ -83,6 +83,7 @@ class OrderController extends Controller
|
|||||||
die('order is paid');
|
die('order is paid');
|
||||||
}
|
}
|
||||||
$order->status = 1;
|
$order->status = 1;
|
||||||
|
$order->callback_no = $obj['id'];
|
||||||
if (!$order->save()) {
|
if (!$order->save()) {
|
||||||
abort(500, 'fail');
|
abort(500, 'fail');
|
||||||
}
|
}
|
||||||
|
@ -232,12 +232,10 @@ class OrderController extends Controller
|
|||||||
abort(500, '支付网关请求失败');
|
abort(500, '支付网关请求失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
Redis::set($source['id'], $order->trade_no);
|
if (!Redis::set($source['id'], $order->trade_no)) {
|
||||||
Redis::expire($source['id'], 3600);
|
abort(500, '订单创建失败');
|
||||||
$order->callback_no = $source['id'];
|
|
||||||
if (!$order->save()) {
|
|
||||||
abort(500, '订单更新失败');
|
|
||||||
}
|
}
|
||||||
|
Redis::expire($source['id'], 3600);
|
||||||
return $source['redirect']['url'];
|
return $source['redirect']['url'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,13 +256,10 @@ class OrderController extends Controller
|
|||||||
if (!$source['wechat']['qr_code_url']) {
|
if (!$source['wechat']['qr_code_url']) {
|
||||||
abort(500, '支付网关请求失败');
|
abort(500, '支付网关请求失败');
|
||||||
}
|
}
|
||||||
|
if (!Redis::set($source['id'], $order->trade_no)) {
|
||||||
Redis::set($source['id'], $order->trade_no);
|
abort(500, '订单创建失败');
|
||||||
Redis::expire($source['id'], 3600);
|
|
||||||
$order->callback_no = $source['id'];
|
|
||||||
if (!$order->save()) {
|
|
||||||
abort(500, '订单更新失败');
|
|
||||||
}
|
}
|
||||||
|
Redis::expire($source['id'], 3600);
|
||||||
return $source['wechat']['qr_code_url'];
|
return $source['wechat']['qr_code_url'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user