Custom offline payment methods
Magento provides several out-of-the-box offline payment methods, such as Banktransfer
, Cashondelivery
, Checkmo
, and Purchaseorder
. You can see them in the vendor/magento/module-offline-payments/Model
directory.
When it comes to payment methods, it is more common to use an online payment provider (gateway), such as PayPal or Braintree. Sometimes, project requirements may be such that we may need a custom coded payment method. You will need to think of programmatic product import and order creation script that might specialize in some specifically labeled payment method. Thus, the payment process will be controlled by us.
In such cases, knowing how to code our own offline payment method might come in handy. It is worth ...
Get Magento 2 Developer's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.