I'm stuck with creating simple payment method. It is displayed in admin panel but not on frontend.

In Chrome developer tools I get errors on frontend that are displayed on pictures below:

enter image description here

enter image description here

enter image description here

It seems to me, that corresponding file is not deployed into pub/static folder, though I cleared pub/static and generated directories manualy and then ran bin/magento setup:upgrade, bin/magento setup:di:compile, bin/magento setup:static-content deploy -f. And flushed cache finally.

My Payment method is just a copypasta from this source: Meetanshi Payment Method

My method-renderer.js file:

function (
) {
    'use strict';
            type: 'custompayment',
            component: 'Meetanshi_CustomPayment/js/view/payment/method-renderer/custompayment'
    return Component.extend({});

Thank You in advance!

P.S. Also I'm using custom Magento_Checkout module. Maybe this is the reason?

  • clear cpanel or cloud cache if enable Aug 2, 2021 at 5:16

2 Answers 2


Try to run following commands .

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento setup:di:compile
  • I've tried, but it doesn't work( Aug 2, 2021 at 13:50

Finally, I resolved the issue. It was due to a typo in line 21 of my module's 'checkout_index_index.xml' file:

<item name="component" xsi:type="string">Meetanshi_Custompayment/js/view/payment/method-renderer</item>

instead of:

<item name="component" xsi:type="string">Meetanshi_CustomPayment/js/view/payment/method-renderer</item>

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.