How we can add a custom payment method only enable for admin section in magento?
Answer Posted / Rupal Srivastava
To create a custom payment method visible only in the Magento admin, follow these steps:
1. Create a new module by running `composer create-project --repository=https://repo.magento.com/magento/project magento2_customPayment`
2. Register the payment method in your etc/di.xml file.
3. Implement the payment gateway interface in your custom module's Payment.php.
4. Create a System > Sales > Payment Methods > [Your Module Name] > [Payment Method] configuration for enabling the payment method only in the admin section.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers