You can add support for new refund methods by performing the following steps:

  1. Extend the atg.commerce.csr.returns.RefundMethod class, which holds your custom refund method information.

    To create a limit of the refund amount for the custom refund method type, you must extend the getMaximumRefundAmount method. This method is used in the refundType page. The maximum refund amount disables a user’s ability to enter a higher refund amount. If you do not implement the method, no refund amount limit is set.

  2. Extend the refundMethod repository item descriptor, which is defined in the /atg/commerce/custsvc/CsrRepository.xml file, to save custom refund method information in your database.

  3. Extend the ReturnManager.buildRefundMethodList method, which builds the list of RefundMethod objects from the original order’s payment groups.

    This list is stored in the returnRequest.getRefundMethodList. It generates a RefundMethod for each credit card that has any debited amount that has not yet been credited. If there is still a refund left over, the method allocates the remainder to the generated store credit refund method. You must extend this method to add custom RefundMethod objects but ensure that you do not allocate money across RefundMethods.

  4. Extend the ReturnTools.createRefundMethodItem method, which creates a refund method item for each refund method listed within the returnRequest.getRefundMethodList method.

    After creating a refund method item, the method copies property values from the refund method to the refund item and then adds the item to the repository. You must extend this method to add the custom refund method to the repository. By default, this method handles the credit card and store credit refund methods.

  5. Extend the ReturnManager.issueAlternateCreditType method, which performs the crediting against the refundMethod for all refund types that are not recognized by the issueCredits method.

    You extend the ReturnManager.issueLaternateCreditType method to credit the custom refund type. The issueCredits method handles credit card and store credit refund methods.

  6. Extend the ReturnTools.getRefundMethod method, which generates a ReturnMethod object from the refundmethod repository item when the return request is reloaded.

    You extend this method to generate a custom RefundMethod object whose properties are set from the repository item. By default, this method handles credit card and store credit refund methods.

  7. Add a display page fragment for the custom refund method. The refundType page displays the refund methods from the returnRequest.getRefundMethodList method.

    You must add a display page fragment for the custom refund method. Update the payment group type configuration file by updating the custom payment group displayRefundMethodPageFragment property value. This property identifies a page fragment that specifies the location of a JSP fragment. The JSP fragment displays your custom refund method type. The display fragment is used in the refund type and the return confirmation pages. For detailed information on working with page fragments, refer to the ATG Page Developer's Guide.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices