mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Stripe: Add credit card
This commit is contained in:
parent
1a4d2a4460
commit
36d322611e
@ -36,8 +36,9 @@ class AuthorizeStripeCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleStripe(stripe, cardHolderName) {
|
handleStripe(stripe, cardHolderName) {
|
||||||
processingOverlay(true);
|
|
||||||
this.cardButton.disabled = true;
|
this.cardButton.disabled = true;
|
||||||
|
this.cardButton.querySelector('span').classList.add('hidden');
|
||||||
|
this.cardButton.querySelector('svg').classList.remove('hidden');
|
||||||
|
|
||||||
stripe
|
stripe
|
||||||
.handleCardSetup(this.clientSecret, this.cardElement, {
|
.handleCardSetup(this.clientSecret, this.cardElement, {
|
||||||
@ -55,8 +56,9 @@ class AuthorizeStripeCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleFailure(result) {
|
handleFailure(result) {
|
||||||
processingOverlay(false);
|
|
||||||
this.cardButton.disabled = false;
|
this.cardButton.disabled = false;
|
||||||
|
this.cardButton.querySelector('span').classList.remove('hidden');
|
||||||
|
this.cardButton.querySelector('svg').classList.add('hidden');
|
||||||
|
|
||||||
let errors = document.getElementById('errors');
|
let errors = document.getElementById('errors');
|
||||||
|
|
||||||
|
@ -76,7 +76,11 @@
|
|||||||
id="card-button"
|
id="card-button"
|
||||||
data-secret="{{ $intent->client_secret }}"
|
data-secret="{{ $intent->client_secret }}"
|
||||||
class="button button-primary">
|
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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user