razorpay-react-sdk
Version:
A simple Razorpay integration package for React & Next.js with TypeScript support.
43 lines (42 loc) • 1.92 kB
TypeScript
export type ModalOptions = {
/**
* Indicates whether clicking the translucent blank space outside the Checkout form should close the form.
*
* - `true`: Closes the form when the customer clicks outside the checkout form.
* - `false` (default): Does not close the form when the customer clicks outside the checkout form.
*/
backdropclose?: boolean;
/**
* Indicates whether pressing the escape key should close the Checkout form.
*
* - `true` (default): Closes the form when the customer presses the escape key.
* - `false`: Does not close the form when the customer presses the escape key.
*/
escape?: boolean;
/**
* Determines whether Checkout must behave similarly to the browser when the back button is pressed.
*
* - `true` (default): Checkout behaves similarly to the browser. When the browser's back button is pressed, the Checkout also simulates a back press as long as the Checkout modal is open.
* - `false`: Checkout does not simulate a back press when the browser's back button is pressed.
*/
handleback?: boolean;
/**
* Determines whether a confirmation dialog box should be shown if the customer attempts to close the Checkout.
*
* - `true`: A confirmation dialog box is shown.
* - `false` (default): No confirmation dialog box is shown.
*/
confirm_close?: boolean;
/**
* Used to track the status of Checkout. This function is called when the modal is closed by the user.
* You can pass a modal object with `ondismiss: function() {}` as options. The function is triggered when Checkout closes, even after a failure if `retry` is false.
*/
ondismiss?: () => void;
/**
* Shows an animation before loading the Checkout.
*
* - `true` (default): Animation appears.
* - `false`: No animation appears.
*/
animation?: boolean;
};