how can i reload Payment Method section in checkout page?
I create a custom discount. when i set custom discount and apply, i need reload total section and payment section. I use this code:
var deferred = $.Deferred();
getTotalsAction([], deferred);
getPaymentInformationAction(deferred);
$.when(deferred).done(function () {
paymentService.setPaymentMethods(
paymentMethodList()
);
});
i set custom discount and grand total = 0, but just only total section reload again and show correct, payment method is not reload and not show "no payment required", its still show another payment. ? Can Anyone help me? Or Am I missing something?
Thanks In advance.
Best Answer
I think you have problem with your related js file
vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js
Checkout given blow link it might be help to solve your problem.
I hope it will help to you.