mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Sofort: Alipay
This commit is contained in:
parent
58a3cc69a9
commit
12c23f14e5
11
resources/js/clients/payments/alipay.js
vendored
11
resources/js/clients/payments/alipay.js
vendored
@ -33,16 +33,19 @@ class ProcessAlipay {
|
||||
|
||||
document.getElementById('pay-now').addEventListener('submit', (e) => {
|
||||
e.preventDefault();
|
||||
processingOverlay(true);
|
||||
document.getElementById('pay-now').disabled = true;
|
||||
|
||||
document.getElementById('pay-now-button').disabled = true;
|
||||
document.querySelector('#pay-now-button > svg').classList.add('hidden');
|
||||
document.querySelector('#pay-now-button > span').classList.remove('hidden');
|
||||
|
||||
this.stripe.createSource(data).then(function(result) {
|
||||
if (result.hasOwnProperty('source')) {
|
||||
return (window.location = result.source.redirect.url);
|
||||
}
|
||||
|
||||
processingOverlay(false);
|
||||
document.getElementById('pay-now').disabled = false;
|
||||
document.getElementById('pay-now-button').disabled = false;
|
||||
document.querySelector('#pay-now-button > svg').classList.remove('hidden');
|
||||
document.querySelector('#pay-now-button > span').classList.add('hidden');
|
||||
|
||||
this.errors.textContent = '';
|
||||
this.errors.textContent = result.error.message;
|
||||
|
@ -40,8 +40,12 @@
|
||||
</dd>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-4 py-5 flex justify-end">
|
||||
<button class="button button-primary">
|
||||
{{ ctrans('texts.pay_now') }}
|
||||
<button class="button button-primary" id="pay-now-button">
|
||||
<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>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user