Programmatically create a partial invoice for an order with an existing invoice

I am trying to update an existing order by adding a charge to it after it's already been invoiced (ie status = processing but not complete). For example, Initial Order Total = $500 Updated Order Total = $600 pay rest of the $100 using a different invoice.

The issue with this is that when the initial order was paid by credit card and I try to pay for the extra charge using a credit card too - wanting to produce two invoices, the initial order gets canceled and a new order with a new invoice is created. I believe this is happening because the second payment is producing a full invoice instead of a partial one. It would be great if someone could help me out with this!



from Active questions tagged magento-enterprise - Magento Stack Exchange

Click link to view all answer https://magento.stackexchange.com/questions/310329/programmatically-create-a-partial-invoice-for-an-order-with-an-existing-invoice