I have an invoice payment method. The customer's call center should be able to create orders from backend and add this specific payment method to the order. The payment method is a gateway, which then creates the invoice to the finance company's system.
How do I implement this?
Best Answer
At first, your payment method should be available for usage in Admin panel and you need to specify
can_use_internal
property in your payment methodYourCustomPayment/etc/config.xml
file:On the next step, you need to create block class, depends on your integration it will extend
\Magento\Payment\Block\Form\Cc
or\Magento\Payment\Block\Form
.And, after block is created, you need to create template view for this block and specify it in the layout for billing form (
YourPayment/view/adminhtml/layout/sales_order_create_index.xml
):And for
YourPayment/view/adminhtml/layout/sales_order_create_load_block_billing_method.xml
For more details, please, see my answer How to add custom payment gateway extension in magento2.
UPD This and this topics describe how to configure payment method for Adminl panel.