mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
ea629e2967
commit
621658ba84
@ -69,13 +69,13 @@ class OrderController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$obj = $event->data->object;
|
$obj = $event->data->object;
|
||||||
if ($obj['status'] == 'succeeded') {
|
if ($obj['status'] == 'chargeable') {
|
||||||
$order = Order::where('callback_no', $obj['source']['id'])->first();
|
$order = Order::where('callback_no', $obj['id'])->first();
|
||||||
if (!$order) {
|
if (!$order) {
|
||||||
abort(500, 'fail');
|
abort(500, 'fail');
|
||||||
}
|
}
|
||||||
if ($order->status !== 0) {
|
if ($order->status !== 0) {
|
||||||
die('success');
|
die('order is paid');
|
||||||
}
|
}
|
||||||
$order->status = 1;
|
$order->status = 1;
|
||||||
if (!$order->save()) {
|
if (!$order->save()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user