Magento – Magento invoices logic, payment methods

invoicemagento-1.7

We have implemented one local solutions for Magento invoices, where there is an unique code on every Magento invoice (this is according to our local law). We see that now every default Magento invoice has that unique code. After the installation of extension, we have embeded that code in Abstract.php to be dispalyed in all invoices that are generated.

We will now like to seperate Magento invoices and leave classic Magento invoices for all payment methods besides credit card payment. As we are Magento starters, we dont have deep understanding of Magento invoices, so we need some informations:

  1. Does someone have a good links / resources on magento invoices part to learn from?

  2. What is the general logic behind Magento invoices? Can someone briedly explain how they work, and what is used from Magento to generate one invoice?

  3. We need to implement somehow if condition (if paymentmethod credit card, then use special invoices with code from extension, if not then use regular magento invoices).
    On the Magento invoice files, where are the points the payment methods are defined. What will we need to change and do to split these invoices?

Best Answer

The logic in a magento proces.

  • Customer places item in cart.
  • Quote is generated with own quote id.
  • Customer checks out payment via cart.

Two possibilities.

Payment via eft:

  • Electronic transaction details are generated.
  • Customer is shipped to payment service provider with quote id as payment reference.
  • Invoice is generated and set to pending payment referencing to quote origins and payment details
  • transaction details are returned from payment service provider.
  • Transaction details are updated.
  • if transaction was successful invoice is set to paid and order status is changed to processing.

Payment via invoice/Cheques

  • the invoice needs to be generated by hand by default

  • set to paid manually via the admin panel,

    but basically same process as above.

Related Topic