Send verification result
Process the result obtained from integrated identity verification.
Based on the the verification result in the response object (rsp
) returned after the verification process is completed, add the post-verification processing logic in the callback
function. When the verification is successful, add the logic to send the verification ID (imp_uid
) to the server as in the following example. Check the value returned when the verification is successful.
1. Example of sending data via callback
client-sideIMP.certification({ /* ...Omitted... */ }, function (rsp) { // callback if (rsp.success) { // When verification is successful // jQuery HTTP request jQuery.ajax({ url: "{server-side endpoint to receive verification info}", method: "POST", headers: { "Content-Type": "application/json" }, data: { imp_uid: rsp.imp_uid } }); } else { alert("Verification failed. Error: " + rsp.error_msg); } });Example of sending data via redirection
client-sideIMP.certification({ /* ...Omitted... */ }, rsp => { // callback if (rsp.success) { // When verification is successful // axios HTTP request axios({ url: "{server-side endpoint to receive verification info}", method: "post", headers: { "Content-Type": "application/json" }, data: { imp_uid: rsp.imp_uid } }); } else { alert(\`Verification failed. Error: \${rsp.error_msg}\`); } });
2. Example of sending data via redirection
The page is redirected to the URL specified in param.
m_redirect_url
of IMP.
certification
with the verification data as follows:
Query StringGET {m_redirect_url}?imp_uid={}&merchant_uid={merchant_uid for verification}&success={true or false}