Magento 2 payment Checkout page keep showing loader. without showing any error on console or in terminal.
Best Answer
It's because none of the payment options will be enabled by default. You can enable with Stores->configuration-> Sales->Payment Methods-> Cash On Delivery Payment.
So for testing purpose, you can enable 'Cash on Delivery' option from admin panel.
Flush the cache and then try again.
Edit: I assume that some component fails on the checkout and trigger .fail() method but the error processor is not handling errors correctly and display errors and hides the loader.
Open vendor/magento/module-checkout/view/frontend/web/js/action/set-payment-information.js and find:
return storage.post(
serviceUrl, JSON.stringify(payload)
).fail(
function (response) {
errorProcessor.process(response, messageContainer);
}
).always(
function () {
fullScreenLoader.stopLoader(); // you need remove this
}
);
For replace code you can create "preference" for this file in your theme in requirejs-config.js.
Best Answer
It's because none of the payment options will be enabled by default. You can enable with Stores->configuration-> Sales->Payment Methods-> Cash On Delivery Payment. So for testing purpose, you can enable 'Cash on Delivery' option from admin panel. Flush the cache and then try again.