Offline refund element
Learn how to use the offline refund element.
Collecting details from your customer may be necessary to facilitate a refund with certain payment flows such as Boleto, Konbini, Online Banking, or Wire Transfer.
Creating an offline refund element
You should use the createElement
function exposed through the DigitalRiver Object. This object follows the same pattern and allows for the same custom classes and styles as other elements.
With this element, you must provide a refundToken
, which is provided in the refund response from our APIs.
Offline refund element functions
offlineRefund.mount();
Call this function to place the created offline refund element on your page.
offlineRefund.unmount();
Call this function to remove the offline refund element from your page. The element may be re-added to your page by calling mount()
.
offlineRefund.destroy();
Call this function to remove the offline refund element from your page as well as remove its functionality. You cannot re-add an element that has been destroyed to your page via mount()
.
Offline refund element events - offlineRefund.on('event', handler);
Use this function to listen to events that can be used to build and enhance your purchase flow.
Event | Triggered When |
---|---|
The created element is loaded and ready to accept input. | |
The element's state has changed. |
Ready
The Ready event triggers when the element loads and is available to take user input.
Change
A change event triggers when the offline refund element's state has changed. If using this element, you will only receive this event when the customer has filled out the form and the data has been accepted. At this point, you may remove the element from your screen by calling unmount()
or destroy()
.
Key | Value Description |
---|---|
complete | Whether the element is in a complete state. |
elementType | The type of element. |
Last updated