Magento 2.4.6-p2
When trying to add my custom payment I’ve got an error in console when going to checkout/#payment page. Something like that:
[ERROR] Failed to load the “Alex_Mypay/payment/mypay-form” template
requested by “checkout.steps.billing-step.payment.payments-list.mypay”
Does anybody know where this bug is from?
Copy/paste from Magento_OfflinePayments
app/code/Alex/Mypay/view/frontend/web/js/view/payment/method-renderer/mypay-method.js
defaults: {
template: 'Alex_Mypay/payment/mypay-form'
},
And have a template in
app/code/Alex/Mypay/view/frontend/web/template/payment/mypay-form.html
exact copy of
vendor/magento/module-offline-payments/view/frontend/web/template/payment/purchaseorder-form.html
And weird, I got something on my payments list anyway. I got the form but without a button correctly rendered, without a title (default or translated).
How it could render form and at the same time give me an error “Failed to load the template”? :/