I'm working on implementing a payment gateway using the sample code from Magento github on my Magento 2.1 site.
For some reason, Magento does not seems to use the new functions I added to ..payment/method-renderer/sample_method.js. Let's say I have a function called getAwesomeInfo() that will return "hello world" string, I got the error function is not defined when I tried to add it to ../template/payment/form.html
So far I have checked the following:
- .../view/frontend/layout/checkout_index_index.html, and confirm that include the payment component file. If I try to change the path, the site will throw error 500.
- However, when I tried to edit the component file .../payment/sample_gateway.js and .../payment/method-renderer/sample_gateway.js, it doesn't seem to do anything. It's as if Magento either ignore the file or look up the javascript code from any else.
- The site is currently on development mode. I have tried to disable cache and rebuild the static content, but that didn't seem to have any effect.
I may have missed something here. Any advise would be appreciate.
Thank you very much.