From 621658ba844fefdfc66e8acf41409091590175b7 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 29 Nov 2019 14:26:45 +0800 Subject: [PATCH] update --- app/Http/Controllers/Guest/OrderController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Guest/OrderController.php b/app/Http/Controllers/Guest/OrderController.php index 325bd90f..90c35d00 100644 --- a/app/Http/Controllers/Guest/OrderController.php +++ b/app/Http/Controllers/Guest/OrderController.php @@ -69,13 +69,13 @@ class OrderController extends Controller } $obj = $event->data->object; - if ($obj['status'] == 'succeeded') { - $order = Order::where('callback_no', $obj['source']['id'])->first(); + if ($obj['status'] == 'chargeable') { + $order = Order::where('callback_no', $obj['id'])->first(); if (!$order) { abort(500, 'fail'); } if ($order->status !== 0) { - die('success'); + die('order is paid'); } $order->status = 1; if (!$order->save()) {