O'Reilly logo

Magento Extensions Development by Jérémie Bouchet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing your own payment method

Magento 2 completely remastered the checkout steps and based the date exchange on a REST API. Server-side web APIs are built with a new M2 Service Contracts approach. One of the benefits of this new method is that checkout form is now designed to be compact enough to easily fill in all the data using a mobile or tablet.

We will see here how to propose to your customer a new custom offline payment method, which can be coupled to your extension. We will call it money.

Implementing the method

The method will be rendered as an UI component, in a dedicated javascript file:

  1. Create the file [extension_path]/view/frontend/web/js/view/payment/method-renderer/ticketblaster-money.js and add the following code:
    define( [ 'Magento_Checkout/js/view/payment/default' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required