🚚3. Send verification result
Process the result obtained from credit card identity verification.
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);
}
}); IMP.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
Last updated