Fixes for stripe tokens

This commit is contained in:
David Bomba 2024-10-07 13:51:45 +11:00
parent 5db3fb1ba3
commit 6f2bcd8b33
3 changed files with 22 additions and 23 deletions

View File

@ -1,3 +1,3 @@
{ {
"Admin": true "Admin": true
} }

View File

@ -53,7 +53,7 @@
@include('portal.ninja2020.gateways.includes.payment_details') @include('portal.ninja2020.gateways.includes.payment_details')
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')])
<ul class="list-none"> <ul class="list-none">
@if(count($tokens) > 0) @if(count($tokens) > 0)
@foreach($tokens as $token) @foreach($tokens as $token)
<li class="py-2 cursor-pointer"> <li class="py-2 cursor-pointer">
@ -62,7 +62,7 @@
type="radio" type="radio"
data-token="{{ $token->token }}" data-token="{{ $token->token }}"
name="payment-type" name="payment-type"
class="form-check-input text-indigo-600 rounded-full cursor-pointer toggle-payment-with-token toggle-payment-with-token"/> class="form-check-input text-indigo-600 rounded-full cursor-pointer toggle-payment-with-token"/>
<span class="ml-1 cursor-pointer">**** {{ $token->meta?->last4 }}</span> <span class="ml-1 cursor-pointer">**** {{ $token->meta?->last4 }}</span>
</label> </label>
</li> </li>

View File

@ -32,35 +32,34 @@
@include('portal.ninja2020.gateways.includes.payment_details') @include('portal.ninja2020.gateways.includes.payment_details')
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')])
<ul class="list-none"> <ul class="list-none space-y-2">
@if(count($tokens) > 0) @if(count($tokens) > 0)
@foreach($tokens as $token) @foreach($tokens as $token)
<li class="py-2 hover:text-white hover:bg-blue-600"> <li class="py-2 hover:bg-gray-100 rounded transition-colors duration-150">
<label class="mr-4"> <label class="flex items-center cursor-pointer px-2">
<input <input
type="radio" type="radio"
data-token="{{ $token->token }}" data-token="{{ $token->token }}"
name="payment-type" name="payment-type"
class="form-check-input text-indigo-600 rounded-full cursor-pointer toggle-payment-with-token toggle-payment-with-token"/> class="form-radio text-indigo-600 rounded-full cursor-pointer toggle-payment-with-token"/>
<span class="ml-1 cursor-pointer">**** {{ $token->meta?->last4 }}</span> <span class="ml-2 cursor-pointer">**** {{ $token->meta?->last4 }}</span>
</label> </label>
</li> </li>
@endforeach @endforeach
@endisset @endif
<li class="py-2 hover:text-white hover:bg-blue-600"> <li class="py-2 hover:bg-gray-100 rounded transition-colors duration-150">
<label> <label class="flex items-center cursor-pointer px-2">
<input <input
type="radio" type="radio"
id="toggle-payment-with-credit-card" id="toggle-payment-with-credit-card"
class="form-check-input text-indigo-600 rounded-full cursor-pointer" class="form-radio text-indigo-600 rounded-full cursor-pointer"
name="payment-type" name="payment-type"
checked/> checked/>
<span class="ml-1 cursor-pointer">{{ __('texts.new_card') }}</span> <span class="ml-2 cursor-pointer">{{ __('texts.new_card') }}</span>
</label> </label>
</li> </li>
</ul> </ul>
@endcomponent @endcomponent
@include('portal.ninja2020.gateways.stripe.includes.card_widget') @include('portal.ninja2020.gateways.stripe.includes.card_widget')