A complete HTMLfile should look similar to the example below.
<!DOCTYPEhtml><htmllang="en"> <body> <pvt-button></pvt-button> <scripttype="module"src="https://sdk.preventor.com/pvtid/verifyme/verifyme.esm.js" ></script> <script>// Your configuration// For more details refer to the "Prefilling configs" sectionwindow.PvtVerifymeConfig = { credentials: { apiKey:'YOUR_API_KEY', clientSecret:'YOUR_CLIENT_SECRET', tenant:'YOUR_TENANT', banknu:'YOUR_BANKNU', env:'YOUR_ENV', }, }; </script> </body></html>
Integrating with verifyme through pvt-verifyme is the most customizable option.
You can initiate the verification process by executing the open() function from any HTML tag. For example, you can start the process from a sidebar icon or a custom button.
It is recommended to provide a visual indicator to the user that the component has been loaded, and you can use the 'loaded' event for this purpose.
pvt-verifyme provides a loaded event that can be utilized to indicate when the component is being loaded. This event can be helpful, for instance, to enable a button or any other element that will open the component when clicked.
To find out if a user has completed the verification process, canceled it or there was an error. To do this, you can implement the following callback methods:
This callback method is triggered once a user starts the verification flow.
onSubmitted
Method that is being called once verification data is submitted to Preventor. This event emits the following data: cifCode, ticketId, flowStatus, and dispositionStatus.
onFinish
Method that is being called once a user clicks the "Finish" button. This event emits the same data as the onSubmitted event.
onError
This callback method fires when a user canceled the verification flow, the verification ended with an error, or the user performed an incorrect process. You can use this to find out the reason for the error.
CANCELLED_BY_USER
The user cancelled the process before completion.
BIOMETRIC_AUTHENTICATION_FAILED
The user's biometric authentication failed.
SESSION_EXPIRED
The user's session timed out before completion.
BAD_STEP_BY_USER
The user made an error or incorrect input during the process.
MISSING_PARAMETERS
Required parameters were missing from the request or input.
CLIENT_NOT_FOUND
The client did not complete the enrollment process before performing the biometric authentication.
TIME_OUT
The request or process timed out before completion.
PASSED
Verification process passed successfully.
FAILED
Verification process failed.
PENDING
Verification process is still pending.
RETRY
Verification process failed and can be retried.
PROCESSING
Verification process is being processed by a server operation.
NEED_REVIEW
Verification process is awaiting manual review by a user.
TIMEOUT
Verification process timed out.
LOGGED_OUT
User logged out during the verification process.
LOST_CONNECTION
Connection to server lost during the verification process.
QUIT
User quit the verification process.
IN_PROGRESS
Verification process is in progress.
ACCEPTED
Verification process has been accepted.
REJECTED
Verification process has been rejected.
ABANDONED
Verification process has been abandoned (not completed due to some reason, such as user dropping off).