Interceptor

The checkout process interceptor.

interceptor?: Interceptor

NOTE

Pass this property when you enable capabilities.block_progress in the configuration file and the merchant enables this feature in the checkout editor.

CAUTION

This API can only be used on the checkout page.

interceptorInterceptor
render("Checkout::Dynamic::Render", (props) => {
const { interceptor } = props;
function validate() {
if (interceptor) {
interceptor.validate(() => {
// do something
// if pass
return Promise.resolve({
success: true,
});
});
}
}

const top = (
<>
<Button onPress={validate}>validate</Button>
</>
);

return top;
});
Was this article helpful to you?