DigitalRiverCheckout object
Learn about the functionality exposed by the DigitalRiverCheckout object
Once you initialize DigitalRiverCheckout.js, you can use the DigitalRiverCheckout
object to:
Create an instance of a Prebuilt Checkout
The DigitalRiverCheckout
exposes the createModal()
and embed()
functions, either of which can be used to create an interface that customers use to checkout.
createModal(checkoutSessionId, config)
createModal(checkoutSessionId, config)
This function creates an instance of a checkout modal window, a graphical control element that appears in front of the other content on the page. When displayed, the user’s interaction with your content is temporarily disabled, and they must engage with the modal by completing checkout or closing the window.
The function accepts a checkout session identifier and a configuration object.
embed(checkoutSessionId, config)
embed(checkoutSessionId, config)
This function creates an Inline Frame element and adds Prebuilt Checkout, allowing you to embed the entire checkout process directly into your website.
Creating an instance of components
The DigitalRiverCheckout
object exposes components()
. For details, refer to Components.
Display the checkout button
The DigitalRiverCheckout
object exposes renderButton()
, which displays a checkout button allowing customers to initiate the checkout process. For details, refer to Rendering a checkout button.
Determine the status of the modal
The DigitalRiverCheckout
object exposes getStatus()
, which returns data on a Prebuilt Checkout's current state. For details, refer to Determining the checkout's status.
Last updated