From 036bb00c08b124984e6b46460a8591072df36ede Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Thu, 4 Jun 2020 18:26:28 +0800 Subject: [PATCH] stripe test --- app/Http/Controllers/Guest/OrderController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Guest/OrderController.php b/app/Http/Controllers/Guest/OrderController.php index f6b50e05..33249325 100644 --- a/app/Http/Controllers/Guest/OrderController.php +++ b/app/Http/Controllers/Guest/OrderController.php @@ -69,10 +69,10 @@ class OrderController extends Controller case 'source.chargeable': $source = $event->data->object; \Stripe\Charge::create([ - 'amount' => $source['amount'], - 'currency' => $source['currency'], - 'source' => $source['id'], - 'metadata' => $source->metadata + 'amount' => $source->amount, + 'currency' => $source->currency, + 'source' => $source->id, + 'metadata' => (array)$source->metadata ]); die('success'); break;