1

I added a custom payment option for Magento 2 admin. When using the payment option checkout from admin the order total showing as the total due. enter image description here

How to make it as total paid instead of Total Due when i am using my custom payment option placing an order from admin

config.xml

<default>
        <payment>
            <adminpaymentmethod>
                <active>1</active>
                <title>Pay Online</title>
                <order_status>processing</order_status>
                <allowspecific>0</allowspecific>
                <preselect>1</preselect>
                <model>Vendor\AdminPaymentMethod\Model\AdminPaymentMethod</model>
            </adminpaymentmethod>
        </payment>
    </default>
5
  • Do you create a custom payment? – Khoa TruongDinh Feb 2 '20 at 3:39
  • I created a custom payment for admin. When admin using that payment means I need to make total should be paid instead of due. – Arul Feb 2 '20 at 7:48
  • Should try this answer: magento.stackexchange.com/questions/217045/… – Khoa TruongDinh Feb 2 '20 at 10:53
  • Thanks for your reply I want to set the payment as paid when admin used to checkout order from the backend using a specific payment method. – Arul Feb 2 '20 at 11:51
  • you need just to create the invoice for your order and the amount will be set to paid, see my ansewer below – Mohamed23gharbi Feb 2 '20 at 19:06
1

You need to create an INVOICE and thats all. When you create the invoice Amount Due will become paid (Your admin user has just to create the invoice once order is created, or you can create it programatically so he does not take that step)

NOTE : Why don't you just use check / money order method ? Do your custom method have specific logic?

Before invoice : just created, before invoice

After invoice : invoice created, now amount is paid

5
  • I didn't use cod because i having cod charges. I only go for custom payment method only when I received money from the customer and after that only I create an order for customers from the backend. I need to make it as prepaid before the invoice get generated. – Arul Feb 3 '20 at 20:08
  • you can create the invoice programatically then, but still cannot see why just don't create manually as you are already in admin panel – Mohamed23gharbi Feb 7 '20 at 15:56
  • my requirement is, need to make it as a prepaid order before creating an invoice. – Arul Feb 8 '20 at 16:19
  • Even legally you have to invoice as you received a payment. And so functionally a paid order should be invoiced. – Mohamed23gharbi Feb 8 '20 at 19:05
  • I want to change the method name as prepaid it is currently showing as COD – Arul Feb 9 '20 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.