diff --git a/resources/js/clients/payments/sofort.js b/resources/js/clients/payments/stripe-sofort.js similarity index 93% rename from resources/js/clients/payments/sofort.js rename to resources/js/clients/payments/stripe-sofort.js index 5e241ab26414..2e5da55ac7a5 100644 --- a/resources/js/clients/payments/sofort.js +++ b/resources/js/clients/payments/stripe-sofort.js @@ -34,9 +34,7 @@ class ProcessSOFORT { }, }; - document.getElementById('pay-now').addEventListener('submit', (e) => { - e.preventDefault(); - + document.getElementById('pay-now').addEventListener('click', (e) => { document.getElementById('pay-now-button').disabled = true; document.querySelector('#pay-now-button > svg').classList.remove('hidden'); document.querySelector('#pay-now-button > span').classList.add('hidden'); @@ -54,8 +52,6 @@ class ProcessSOFORT { this.errors.textContent = result.error.message; this.errors.hidden = false; - processingOverlay(false); - document.getElementById('pay-now').disabled = false; }); }); diff --git a/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php index a53402bf3614..3393a87c75b7 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php @@ -1,61 +1,23 @@ -@extends('portal.ninja2020.layout.app') -@section('meta_title', ctrans('texts.sofort')) +@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'SOFORT (Stripe)', 'card_title' => 'SOFORT (Stripe)']) -@push('head') +@section('gateway_head') -@endpush +@endsection -@section('body') -
-
-
- -
-
-

- {{ ctrans('texts.pay_now') }} -

-

- {{ ctrans('texts.complete_your_payment') }} -

-
-
-
-
- {{ ctrans('texts.payment_type') }} -
-
- {{ ctrans('texts.sofort') }} ({{ ctrans('texts.bank_transfer') }}) -
-
-
-
- {{ ctrans('texts.amount') }} -
-
- {{ App\Utils\Number::formatMoney($amount, $client) }} -
-
-
- -
-
-
-
-
-
+@section('gateway_content') + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.sofort') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now') @endsection @push('footer') - -@endpush \ No newline at end of file + +@endpush diff --git a/webpack.mix.js b/webpack.mix.js index 120a08b6f0dc..6a2fd6e37d05 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -23,8 +23,8 @@ mix.js("resources/js/app.js", "public/js") "public/js/clients/invoices/payment.js" ) .js( - "resources/js/clients/payments/sofort.js", - "public/js/clients/payments/sofort.js" + "resources/js/clients/payments/stripe-sofort.js", + "public/js/clients/payments/stripe-sofort.js" ) .js( "resources/js/clients/payments/alipay.js",