KnownError: Bridge 응답을 받지 못했습니다.
결제가완료되고
백엔드 정상적으로 처리된후 결제완료 페이지에서
KnownError: Bridge 응답을 받지 못했습니다.
스크립트에러가 나옵니다 .
어떤원인인지 원인파악이안됩니다.
async function confirm() {
const requestData = {
paymentKey: $("#paymentKey").val(),
orderId: $("#orderId").val(),
amount: $("#amount").val(),
};
const response = await fetch("/TossPay/confirm", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(requestData),
});
const json = await response.json();
if (!response.ok) {
// 결제 실패 비즈니스 로직을 구현하세요.
console.log(json);
window.location.href =
}
// 결제 성공 비즈니스 로직을 구현하세요.
console.log(json);
}
confirm();
백엔드 정상적으로 처리된후 결제완료 페이지에서
KnownError: Bridge 응답을 받지 못했습니다.
스크립트에러가 나옵니다 .
어떤원인인지 원인파악이안됩니다.
async function confirm() {
const requestData = {
paymentKey: $("#paymentKey").val(),
orderId: $("#orderId").val(),
amount: $("#amount").val(),
};
const response = await fetch("/TossPay/confirm", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(requestData),
});
const json = await response.json();
if (!response.ok) {
// 결제 실패 비즈니스 로직을 구현하세요.
console.log(json);
window.location.href =
/TossPay/PayFail?message=${json.message}&code=${json.code};}
// 결제 성공 비즈니스 로직을 구현하세요.
console.log(json);
}
confirm();
