JavaScript and React bindings take in a configuration object with the following format:
Field | Type | Notes |
---|---|---|
publicKey | string | Your Rutter-issued public token which you can find in the Rutter Dashboard. |
onSuccess | function of following type: (err?: ErrorEnum) => any; | See definition for ErrorEnum below |
onExit | function of following type: (err?: ErrorEnum) => any; | See definition for ErrorEnum below |
debug | boolean | Whether to enable debug mode, which log the steps of the Rutter Link flow to the console. Defaults to false. |
A Note on Callbacks
Only one callback will be called - either onSuccess or onExit, but not both.
ErrorEnum
Value | Conditions to Trigger |
---|---|
"MERCHANT_CLOSED" | The popup window has been closed prematurely (usually by the user) - i.e. authentication is incomplete but window is closed. |
"UNKNOWN_ERROR" | The window has passed an event to the link bindings which cannot be handled. |