diff --git a/app/PaymentDrivers/Stripe/ACH.php b/app/PaymentDrivers/Stripe/ACH.php index 0c34594c18..87f9a533bd 100644 --- a/app/PaymentDrivers/Stripe/ACH.php +++ b/app/PaymentDrivers/Stripe/ACH.php @@ -39,6 +39,8 @@ class ACH public function authorizeView(array $data) { + $data['gateway'] = $this->stripe; + return render('gateways.stripe.ach.authorize', array_merge($data)); } @@ -63,7 +65,12 @@ class ACH public function verificationView(ClientGatewayToken $token) { - return render('gateways.stripe.ach.verify', compact('token')); + $data = [ + 'token' => $token, + 'gateway' => $this->stripe, + ]; + + return render('gateways.stripe.ach.verify', $data); } public function processVerification(Request $request, ClientGatewayToken $token) diff --git a/resources/js/clients/payments/stripe-ach.js b/resources/js/clients/payments/stripe-ach.js index 156b9ed196..c362a7f065 100644 --- a/resources/js/clients/payments/stripe-ach.js +++ b/resources/js/clients/payments/stripe-ach.js @@ -58,7 +58,7 @@ class AuthorizeACH { document.getElementById('save-button').disabled = true; document.querySelector('#save-button > svg').classList.remove('hidden'); document.querySelector('#save-button > span').classList.add('hidden'); - + e.preventDefault(); this.errors.textContent = ''; diff --git a/resources/views/portal/ninja2020/gateways/stripe/ach/authorize.blade.php b/resources/views/portal/ninja2020/gateways/stripe/ach/authorize.blade.php index 4ee473aeba..128b7384f0 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/ach/authorize.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/ach/authorize.blade.php @@ -1,7 +1,7 @@ @extends('portal.ninja2020.layout.payments', ['gateway_title' => 'ACH', 'card_title' => 'ACH']) @section('gateway_head') - + @endsection @section('gateway_content') @@ -13,8 +13,8 @@
@csrf - - + + @@ -56,7 +56,7 @@ @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.routing_number')]) @endcomponent - + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_number')]) @endcomponent @@ -74,4 +74,4 @@ @section('gateway_footer') -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/portal/ninja2020/gateways/stripe/ach/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/ach/pay.blade.php index c0163635a7..a35a406cb4 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/ach/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/ach/pay.blade.php @@ -1,29 +1,42 @@ @extends('portal.ninja2020.layout.payments', ['gateway_title' => 'ACH', 'card_title' => 'ACH']) @section('gateway_content') - @if($token) + @if(count($tokens) > 0) - + @include('portal.ninja2020.gateways.includes.payment_details') @csrf - +
- @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) - {{ ctrans('texts.ach') }} ({{ ctrans('texts.bank_transfer') }}) (**** {{ $token->meta->last4 }}) + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset @endcomponent + @else @component('portal.ninja2020.components.general.card-element-single', ['title' => 'ACH', 'show_title' => false]) {{ ctrans('texts.bank_account_not_linked') }} - {{ ctrans('texts.add_payment_method') }} + {{ ctrans('texts.add_payment_method') }} @endcomponent @endif @@ -32,7 +45,13 @@ @push('footer')