The atg.commerce.csr.returns.ReturnManager.buildRefundMethodList(Order, ReturnRequest,double,double)
builds the refund methods from an order and allocates the refund amount. The refund methods are generated using the generateRefundMethodsForReturn
(ReturnRequest)
method.
The total refund amount is distributed as follows:
The
buildRefundMethodList
method uses the store credit amount and the total refund amount to determine what should be allocated to a store credit refund method. ThegetRefundAmountRemaningRefundMethod
returns the store credit refund method.The remaining refund amount from the total refund amount is distributed across other refund methods, using the
allocateRefundAmountForReturn
method.If there is still a remaining refund amount to be allocated, it is added to the
getRefundAmountRemainingRefundMethod
.
For example, you can extend the getRefundAmountRemaningRefundMethod
to return any of the supported refund method types, if the buildRefundMethodList
method receives a zero store credit amount.