mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Stripe: Add credit card
This commit is contained in:
parent
1a4d2a4460
commit
36d322611e
@ -36,8 +36,9 @@ class AuthorizeStripeCard {
|
||||
}
|
||||
|
||||
handleStripe(stripe, cardHolderName) {
|
||||
processingOverlay(true);
|
||||
this.cardButton.disabled = true;
|
||||
this.cardButton.querySelector('span').classList.add('hidden');
|
||||
this.cardButton.querySelector('svg').classList.remove('hidden');
|
||||
|
||||
stripe
|
||||
.handleCardSetup(this.clientSecret, this.cardElement, {
|
||||
@ -55,8 +56,9 @@ class AuthorizeStripeCard {
|
||||
}
|
||||
|
||||
handleFailure(result) {
|
||||
processingOverlay(false);
|
||||
this.cardButton.disabled = false;
|
||||
this.cardButton.querySelector('span').classList.remove('hidden');
|
||||
this.cardButton.querySelector('svg').classList.add('hidden');
|
||||
|
||||
let errors = document.getElementById('errors');
|
||||
|
||||
|
@ -76,7 +76,11 @@
|
||||
id="card-button"
|
||||
data-secret="{{ $intent->client_secret }}"
|
||||
class="button button-primary">
|
||||
{{ ctrans('texts.save') }}
|
||||
<svg class="animate-spin h-5 w-5 text-white hidden" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
||||
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
||||
</svg>
|
||||
<span>{{ __('texts.save') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</dl>
|
||||
|
Loading…
x
Reference in New Issue
Block a user