mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 13:04:30 -04:00
Livewire fixes for subscription purchasds
This commit is contained in:
parent
753c9c4239
commit
d05a58cebe
@ -353,6 +353,7 @@ class BillingPortalPurchase extends Component
|
|||||||
$this->payment_method_id = $gateway_type_id;
|
$this->payment_method_id = $gateway_type_id;
|
||||||
|
|
||||||
$this->handleBeforePaymentEvents();
|
$this->handleBeforePaymentEvents();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,6 +44,7 @@ class InstantPayment
|
|||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
nlog($this->request->all());
|
||||||
$is_credit_payment = false;
|
$is_credit_payment = false;
|
||||||
|
|
||||||
$tokens = [];
|
$tokens = [];
|
||||||
|
@ -6,18 +6,19 @@
|
|||||||
@stop
|
@stop
|
||||||
|
|
||||||
@push('footer')
|
@push('footer')
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function updateGatewayFields(companyGatewayId, paymentMethodId) {
|
|
||||||
document.getElementById('company_gateway_id').value = companyGatewayId;
|
|
||||||
document.getElementById('payment_method_id').value = paymentMethodId;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
document.addEventListener('livewire:init', () => {
|
||||||
|
|
||||||
document.addEventListener('livewire:init', () => {
|
Livewire.on('beforePaymentEventsCompleted', () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
document.getElementById('payment-method-form').submit()
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
|
|
||||||
Livewire.on('beforePaymentEventsCompleted', () => document.getElementById('payment-method-form').submit());
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@endpush
|
@endpush
|
||||||
|
@ -7,14 +7,8 @@
|
|||||||
|
|
||||||
@push('footer')
|
@push('footer')
|
||||||
<script>
|
<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', () => {
|
document.addEventListener('livewire:init', () => {
|
||||||
|
|
||||||
Livewire.on('beforePaymentEventsCompleted', () => {
|
Livewire.on('beforePaymentEventsCompleted', () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
@if($steps['started_payment'] == false)
|
@if($steps['started_payment'] == false)
|
||||||
@foreach($this->methods as $method)
|
@foreach($this->methods as $method)
|
||||||
<button
|
<button
|
||||||
wire:click="handleMethodSelectingEvent('{{ $method['company_gateway_id'] }}', '{{ $method['gateway_type_id'] }}')"
|
wire:click="handleMethodSelectingEvent('{{ $method['company_gateway_id'] }}', '{{ $method['gateway_type_id'] }}'); $wire.$refresh(); "
|
||||||
class="px-3 py-2 border rounded mr-4 hover:border-blue-600">
|
class="px-3 py-2 border rounded mr-4 hover:border-blue-600">
|
||||||
{{ $method['label'] }}
|
{{ $method['label'] }}
|
||||||
</button>
|
</button>
|
||||||
|
@ -51,9 +51,14 @@
|
|||||||
|
|
||||||
document.addEventListener('livewire:init', () => {
|
document.addEventListener('livewire:init', () => {
|
||||||
|
|
||||||
Livewire.on('beforePaymentEventsCompleted', () => document.getElementById('payment-method-form').submit());
|
Livewire.on('beforePaymentEventsCompleted', () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
document.getElementById('payment-method-form').submit()
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@endpush
|
@endpush
|
||||||
|
Loading…
x
Reference in New Issue
Block a user