Exchange payment processing
When an exchange is created, the total order amount of the return order is added to the PENDING_TRANSFER_IN field of the exchange order. This value is always kept synchronized on the exchange and the return order.
For example, if an exchange is initially derived from a return order with a total amount of $40, and a line is later on added to the return that increases that amount to $60, the PENDING_TRANSFER_IN of the exchange is increased to $60 as well.
For advanced and regular exchange orders, if the total amount on the exchange order exceeds the amount in PENDING_TRANSFER_IN, additional payment information needs to be entered.
A TRANSFER_IN charge record is created on the exchange order while a TRANSFER_OUT charge record is created on the order the amounts have been transferred from.
In the case of a pre-paid exchange, payment information has to be collected up front for the entire amount of the exchange.