1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-24 02:11:34 +02:00
invoiceninja/resources/views/billing-portal/purchasev2.blade.php
2024-01-14 12:00:51 +11:00

29 lines
1007 B
PHP

@extends('portal.ninja2020.layout.clean')
@section('meta_title', ctrans('texts.purchase'))
@section('body')
@livewire('billing-portal-purchasev2', ['subscription' => $subscription->id, 'db' => $subscription->company->db, 'hash' => $hash, 'request_data' => $request_data, 'campaign' => request()->query('campaign') ?? null])
@stop
@push('footer')
<script>
function updateGatewayFields(companyGatewayId, paymentMethodId) {
console.log(companyGatewayId, paymentMethodId);
document.getElementById('company_gateway_id').value = companyGatewayId;
document.getElementById('payment_method_id').value = paymentMethodId;
}
document.addEventListener('livewire:init', () => {
Livewire.on('beforePaymentEventsCompleted', () => {
setTimeout(() => {
document.getElementById('payment-method-form').submit()
}, 2500);
});
});
</script>
@endpush