I am trying to set the credit card as pre-selected payment method and is working fine like when i load payment page the credit card payment method is shows selected, but the place order is disabled and not able to place order.

When the payment info page loads, I "Checked" the already "Checked" radio button for the credit card. As soon as I checked it, the "Place Order" button became active. Means, when the page loads, it's showing the options as already checked. But when I click on it, it 'checks it' for real. And then it works.

  • Please help, if any one have solution for this. Commented Jun 17, 2022 at 10:23

1 Answer 1


You didn't specify how you implemented select default payment method

You can try to use following way to select default payment


let config = {
    config: {
        mixins: {
            'Magento_Checkout/js/model/checkout-data-resolver': {
                'Acme_StackExchange/js/model/checkout-data-resolver-mixin': true


], function ($, wrapper, checkoutData, paymentService) {
    'use strict';

    return function (resolver) {
        resolver.resolvePaymentMethod = wrapper.wrap(resolver.resolvePaymentMethod, function (_super) {
            let availablePaymentMethods = paymentService.getAvailablePaymentMethods(),
                selectedPaymentMethod = checkoutData.getSelectedPaymentMethod(),
                defaultPaymentMethod = 'cashondelivery';
            if (!selectedPaymentMethod) {
                availablePaymentMethods.some(function (payment) {
                    if (payment.method == defaultPaymentMethod) {


        return resolver;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.