Преглед изворни кода

Fix single element array bug

tags/v0.1.0
Immanuel Onyeka пре 3 година
родитељ
комит
ca33810392
5 измењених фајлова са 3 додато и 6 уклоњено
  1. +1
    -1
      app/Http/Controllers/BillingController.php
  2. +0
    -2
      resources/js/main.js
  3. +1
    -1
      resources/js/panel/credits.vue
  4. +1
    -1
      resources/js/panel/services.vue
  5. +0
    -1
      resources/views/panel.blade.php

+ 1
- 1
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') {


+ 0
- 2
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
})
}
})


+ 1
- 1
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 =


+ 1
- 1
resources/js/panel/services.vue Прегледај датотеку

@@ -81,7 +81,7 @@

</template>

<credits @purchase-complete="$emit('updateUser')" :preferred="preferred" :token="token" v-if="page == 'credits'"></credits>
<credits @purchase-complete="setTimeout(() => {updateUser, 4000)" :preferred="preferred" :token="token" v-if="page == 'credits'"></credits>

</div>
</template>


+ 0
- 1
resources/views/panel.blade.php Прегледај датотеку

@@ -5,7 +5,6 @@

@section('head-metas')
@parent
<link rel="stylesheet" href="{{asset('main.css')}}">
@endsection

@section('content')


Loading…
Откажи
Сачувај