🚚3. Send verification result
Process the result obtained from mobile identity verification.
Based on the the verification result in the response object (rsp
) returned after the verification process is complete, 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
IMP.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);
}
});
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:
GET {m_redirect_url}?imp_uid={}&merchant_uid={merchant_uid for verification}&success={true or false}
Last updated