If you think you found a bug, please create a ticket in the bug tracker.
If you take code quality seriously, try out the new continuous inspection service.
Before we are going to see how we can conduct payments, let me give you a quick overlook over the model classes, and their purpose.
A PaymentInstruction is the first object that you need to create. It contains information such as the total amount, the payment method, the currency, and any data that is necessary for the payment method, for example credit card information.
Below you find the different states that a PaymentInstruction can go through:
Each PaymentInstruction may be splitted up into several payments. A Payment always holds an amount, and the current state of the work-flow, such as initiated, approved, deposited, etc.
This allows you for example to request a fraction of the total amount to be deposited before an order ships, and the rest afterwards.
Below, you find the different states that a Payment can go through:
Each Payment may have several transactions. Each FinancialTransaction represents a specific interaction with the payment backend. In the case of a credit card payment, this could for example be an authorization transaction.
Below, you find the different states that a FinancialTransaction can go through: