Magento – Magento 2: How to i reload section payment Method in checkout page

magento-2.2.5magento2onepage-checkoutpayment-methods

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.

  1. magento.stackexchange.com/questions/160479
  2. stackoverflow.com/questions/41340262

I hope it will help to you.

Related Topic