DigitalRiverCheckout object
Learn about the functionality exposed by the DigitalRiverCheckout object
The
DigitalRiverCheckout
object exposes createModal()
which creates an instance of the checkout modal and displays it in the browser.document.getElementById('YOUR_CHECKOUT_BUTTON_ID').addEventListener('click', async (event) => {
// An example asynchronous function that creates the checkout session
const checkoutSessionId = await createCheckoutSession();
// Creates and opens the modal
drCheckout.createModal(checkoutSessionId, config);
})
This optional parameter defines checkout options and event handlers.
The
DigitalRiverCheckout
object exposes renderButton()
, which displays a checkout button and allows you to initiate the checkout process. For details, refer to Rendering a checkout button. The
DigitalRiverCheckout
object exposes getStatus()
, which returns data on the modal's current state. For details, refer to Checking the status of the modal.
Last modified 2d ago