mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Catch for paypal script not loading
This commit is contained in:
parent
721c8ed88d
commit
e3b385066b
@ -34,7 +34,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
paypal.Buttons({
|
paypal.Buttons({
|
||||||
|
|
||||||
env: "{{ $gateway->company_gateway->getConfigField('testMode') ? 'sandbox' : 'production' }}",
|
env: "{{ $gateway->company_gateway->getConfigField('testMode') ? 'sandbox' : 'production' }}",
|
||||||
client: {
|
client: {
|
||||||
@if($gateway->company_gateway->getConfigField('testMode'))
|
@if($gateway->company_gateway->getConfigField('testMode'))
|
||||||
@ -60,7 +59,12 @@
|
|||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
}).render('#paypal-button-container');
|
}).render('#paypal-button-container').catch(function(err) {
|
||||||
|
|
||||||
|
document.getElementById('errors').textContent = err;
|
||||||
|
document.getElementById('errors').hidden = false;
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,13 @@
|
|||||||
document.getElementById("server_response").submit();
|
document.getElementById("server_response").submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}).render('#paypal-button-container');
|
}).render('#paypal-button-container').catch(function(err) {
|
||||||
|
|
||||||
|
document.getElementById('errors').textContent = err;
|
||||||
|
document.getElementById('errors').hidden = false;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@endpush
|
@endpush
|
Loading…
x
Reference in New Issue
Block a user