To set this property, call an asynchronous function that creates a checkout-session and returns its unique identifier. For details, refer to Build a configuration object on the Components checkout page.
Redirect after successful checkouts
In the components() configuration object, the optional redirectUrl can be assigned a URL. This represents where you'd like Digital River to redirect customers after payment is authorized, and the checkout-session is successfully converted to an order.
You could use redirectUrl to send your customers to a custom order confirmation page, but if you display the thank you component, then don't define this property.
Define onReady to be notified when components have successfully initialized.
onReady
The onReady property can be assigned a method that accepts data, and executes when the checkout-session has been successfully created and components are ready to accept input.
It might also contain optionalTaxIdentifiers[] or requiredTaxIdentifiers[]. If the former array exists, your application can optionally display the tax identifier component to users. If the latter exists, you're required to do so.
Success event
Define onSuccess to be notified of a successfully completed components checkout.
onSuccess
The onSuccess property can be assigned a method that accepts data and executes when a customer's payment is authorized, and Digital River successfully converts the checkout-session to an order.
The method returns a data object, which represents the order.
requiresShipping
The requiresShipping boolean indicates whether it's necessary to display the shipping component. If false, then the checkout-session'sitems[] might only contain digital products, or the customer might have used the wallet component. In either case, you won't need to display the shipping component to process the transaction successfully.
showTaxIdentifiers
The showTaxIdentifiers boolean indicates whether it's necessary to display the tax identifier component. It's often true when the checkout-session'scustomerType is business and (1) the customer selects a non-United States shipping and/or billing country in the address component, or (2) you assign shoppingCountry a non-US value.
showInvoiceAttribute
The showInvoiceAttribute boolean indicates whether it's necessary to display the invoice component. If truethis indicates that a Taiwanese-based customer is purchasing as an individual (i.e., a B2C transaction).