Online Banking elements
Learn how to use the Online Banking elements.
Last updated
Learn how to use the Online Banking elements.
Last updated
With DigitalRiver.js, you can create an Online Banking element that will automatically retrieve and build a select drop-down that can be styled and placed on your page like other DigitalRiver.js elements.
To create an Online Banking element, use the createElement
function exposed through the DigitalRiver Object. This object follows the same pattern and allows for the same and as other elements.
Call this function to place the created Online Banking element on your page.
Call this function to remove the Online Banking element from your page. The element may be re-added to your page by calling mount()
.
Call this function to remove the Online Banking element from your page as well as remove its functionality. You cannot re-add the destroyed element to your page via mount()
.
Call this function to update the Online Banking element's data.
The Online Banking Element can receive the following events by creating an event listener. Use this function to listen to events that can be used to build and enhance your purchase flow.
The created element is loaded and ready to accept an update request.
A shopper clicked the element's button.
The element has lost focus.
The element's state has changed.
The Ready event triggers when the Online Banking Element has loaded and is available to take an update()
call.
In addition to the type of element returned in the ready function, the online banking element returns hasAvailableBanks
. This Boolean reflects whether the currency and country combination specified has banks available for payment. If this is false, there are no banks available for payment.
elementType
onlinebanking
hasAvailableBanks
A true or false value signals whether banks are available for the currency and country combination provided when creating the element.
The Focus event triggers when the online banking element has focus.
The Blur event triggers when the online banking element no longer has focus.
The Change event triggers when the online banking element's state has changed. If you use this element, you will only receive this event when the customer selects a bank.
complete
Indicates whether the element is in a complete state.
empty
Indicates whether the element is empty.
elementType
The element type.
error
An error object (if applicable).
value
The value of the selected option.
In this flow, you can now use the createSource
method to create a source using the online banking element.