diff --git a/app/Http/Controllers/BillingController.php b/app/Http/Controllers/BillingController.php index f43d8c1..f5e25c1 100644 --- a/app/Http/Controllers/BillingController.php +++ b/app/Http/Controllers/BillingController.php @@ -78,7 +78,7 @@ class BillingController extends Controller public function chargeEvent(Request $request) { $event = \Stripe\Event::constructFrom($request->all()); $charge = $event->data->object; - $transaction = Transaction::where('intent_id', $charge->payment_intent); + $transaction = Transaction::where('intent_id', $charge->payment_intent)->first(); $user = $transaction->user; if ($event->type == 'charge.succeeded') { diff --git a/resources/js/main.js b/resources/js/main.js index 0a78a0d..7d092b4 100644 --- a/resources/js/main.js +++ b/resources/js/main.js @@ -65,8 +65,6 @@ function resendLink(event) { } else { event.target.parentNode.getElementsByTagName('h3')[0].innerText = `${response.status} : ${response.statusText}` - response.json().then((data) => { - event.target.parentNode.getElementsByTagName('h3')[0].innerText = data }) } }) diff --git a/resources/js/panel/credits.vue b/resources/js/panel/credits.vue index 91d77f1..d9b279c 100644 --- a/resources/js/panel/credits.vue +++ b/resources/js/panel/credits.vue @@ -107,7 +107,7 @@ function pay() { document.getElementById('payment-error').textContent = result.error.message } else if (result.paymentIntent.status === 'succeeded') { - setTimeout(() => {this.$emit('purchaseComplete')}, 4000) + this.$emit('purchaseComplete') this.complete = true } else { document.getElementById('payment-error').textContent = diff --git a/resources/js/panel/services.vue b/resources/js/panel/services.vue index 0a872d9..44e8718 100644 --- a/resources/js/panel/services.vue +++ b/resources/js/panel/services.vue @@ -81,7 +81,7 @@ - + diff --git a/resources/views/panel.blade.php b/resources/views/panel.blade.php index cfd6af0..2fa83e0 100644 --- a/resources/views/panel.blade.php +++ b/resources/views/panel.blade.php @@ -5,7 +5,6 @@ @section('head-metas') @parent - @endsection @section('content')