🚚3. 인증 완료정보 전달하기
신용카드 본인인증 이후 획득된 정보를 처리하는 방법을 안내합니다.
1. callback Data 전달 예제
IMP.certification({
/* ...중략... */
}, function (rsp) { // callback
if (rsp.success) { // 인증 성공 시
// jQuery로 HTTP 요청
jQuery.ajax({
url: "{서버의 인증 정보를 받는 endpoint}",
method: "POST",
headers: { "Content-Type": "application/json" },
data: { imp_uid: rsp.imp_uid }
});
} else {
alert("인증에 실패하였습니다. 에러 내용: " + rsp.error_msg);
}
});IMP.certification({
/* ...중략... */
}, rsp => { // callback
if (rsp.success) { // 인증 성공 시
// axios로 HTTP 요청
axios({
url: "{서버의 인증 정보를 받는 endpoint}",
method: "post",
headers: { "Content-Type": "application/json" },
data: { imp_uid: rsp.imp_uid }
});
} else {
alert(\`인증에 실패하였습니다. 에러 내용: \${rsp.error_msg}\`);
}
});
2. 리디렉션 전달 예제
Last updated
Was this helpful?
