Added loader after paypal button success payment
This commit is contained in:
parent
77655fd95d
commit
7a81aacd37
|
|
@ -1,6 +1,12 @@
|
|||
@if (request()->route()->getName() == 'shop.checkout.onepage.index')
|
||||
<script src="https://www.paypal.com/sdk/js?client-id={{core()->getConfigData('sales.paymentmethods.paypal_smart_button.client_id')}}"></script>
|
||||
|
||||
<style>
|
||||
.component-frame.visible {
|
||||
z-index: 1 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.onload = (function() {
|
||||
eventBus.$on('after-payment-method-selected', function(payment) {
|
||||
|
|
@ -28,6 +34,8 @@
|
|||
|
||||
// Finalize the transaction
|
||||
onApprove: function(data, actions) {
|
||||
app.showLoader();
|
||||
|
||||
return actions.order.capture().then(function(details) {
|
||||
return window.axios.post("{{ route('paypal.smart_button.save_order') }}", {
|
||||
'_token': "{{ csrf_token() }}",
|
||||
|
|
@ -41,6 +49,8 @@
|
|||
window.location.href = "{{ route('shop.checkout.success') }}";
|
||||
}
|
||||
}
|
||||
|
||||
app.hideLoader()
|
||||
})
|
||||
.catch(function (error) {
|
||||
window.location.href = "{{ route('shop.checkout.cart.index') }}";
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=e47aa8374e8e18deedd0",
|
||||
"/js/shop.js": "/js/shop.js?id=89d1f873e06bef5887c3",
|
||||
"/css/shop.css": "/css/shop.css?id=4d6a80790b697b2dc931"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,4 +129,6 @@ $(document).ready(function () {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
window.app = app;
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=1163ad750316d05c0869",
|
||||
"/js/velocity.js": "/js/velocity.js?id=4f93a5fcaa9e170dd72f",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
|
||||
"/css/velocity.css": "/css/velocity.css?id=7c8c3bd0d7fa8dd193b9"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ $(document).ready(function () {
|
|||
}
|
||||
});
|
||||
|
||||
new Vue({
|
||||
const app = new Vue({
|
||||
el: "#app",
|
||||
VueToast,
|
||||
|
||||
|
|
@ -359,6 +359,8 @@ $(document).ready(function () {
|
|||
}
|
||||
});
|
||||
|
||||
window.app = app;
|
||||
|
||||
// for compilation of html coming from server
|
||||
Vue.component('vnode-injector', {
|
||||
functional: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue