This commit is contained in:
Benjamin Beganović 2021-01-22 22:49:26 +01:00
parent 713a95d3b2
commit 4930b7b658
2 changed files with 31 additions and 9 deletions

View File

@ -3376,4 +3376,7 @@ return [
'notification_credit_bounced_subject' => 'Unable to deliver Credit :invoice', 'notification_credit_bounced_subject' => 'Unable to deliver Credit :invoice',
'save_payment_method_details' => 'Save payment method details', 'save_payment_method_details' => 'Save payment method details',
'new_card' => 'New card',
'new_bank_account' => 'New bank account',
]; ];

View File

@ -32,16 +32,35 @@
@include('portal.ninja2020.gateways.includes.payment_details') @include('portal.ninja2020.gateways.includes.payment_details')
@if($token) @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')])
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.credit_card')]) @if(count($tokens) > 0)
{{ strtoupper($token->meta->brand) }} - **** {{ $token->meta->last4 }} @foreach($tokens as $token)
@endcomponent <label class="mr-4">
<input
type="radio"
data-token="{{ $token->token }}"
name="payment-type"
class="form-radio cursor-pointer toggle-payment-with-token"/>
<span class="ml-1 cursor-pointer">**** {{ optional($token->meta)->last4 }}</span>
</label>
@endforeach
@endisset
@include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'card_button', 'class' => 'pay_now_button', 'data' => ['id' => $token->hashed_id]]) <label>
@else <input
@include('portal.ninja2020.gateways.authorize.includes.credit_card') type="radio"
@include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'card_button']) id="toggle-payment-with-credit-card"
@endif class="form-radio cursor-pointer"
name="payment-type"
checked/>
<span class="ml-1 cursor-pointer">{{ __('texts.new_card') }}</span>
</label>
@endcomponent
@include('portal.ninja2020.gateways.includes.save_card')
@include('portal.ninja2020.gateways.authorize.includes.credit_card')
@include('portal.ninja2020.gateways.includes.pay_now')
@endsection @endsection
@section('gateway_footer') @section('gateway_footer')