결제창레이어에서 중도취소 시 에러핸들링 문의드립니다
결제창 레이어에서 상단의 뒤로버튼을 클릭후 중도 취소시
failUrl로 이동하지 않고 에러만 발생하는데
이를 어떻게 해결해야 될지 문의드립니다
결제창 요청은 아래의 함수를 통해서 했습니다
// 결제요청
requestPayment(orderId, orderName, successUrl, failUrl, customerEmail, customerName, customerMobilePhone, taxFreeAmount) {
try {
console.log(orderId, orderName, successUrl, failUrl, customerEmail, customerName, customerMobilePhone, taxFreeAmount);
this.widget.requestPayment({
orderId: orderId,
orderName: orderName,
successUrl: successUrl,
failUrl: failUrl,
customerEmail: customerEmail,
customerName: customerName,
customerMobilePhone: customerMobilePhone,
taxFreeAmount: taxFreeAmount
});
} catch (error) {
console.error('Payment request failed:', error);
}
}


17 Replies
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) :
- 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요.
* 주말/공휴일에는 답변이 늦을 수 있어요.
브랜드페이 결제창으로 보이는데 PC 의 경우 결제창을 닫으면
catch (error) {
console.error('Payment request failed:', error);
}
여기로 이동하는게 맞습니다.
모바일은 failurl 로 이동하구요.
엇.. 그런데 catch문쪽으로 떠서 console.error로 찍혔으면
Payment request failed 메시지도 남아야하는데 해당메시지는 보이지않습니다
pc 레이어의경우에는 혹시 리다이렉트하지않고 promise만 반환하나요?
아 지금 requestpayment의 catch 에 잡히지 않으신다는 거죠?
네네 맞습니다
취소만 catch로 가고 인증 실패나 성공은 지정하신 URL 로 갑니다.
지금 SDK v1/v2 중에 어떤거 쓰시나요?
v2사용했습니다
}.catch(function (error) {
console.log(error.message); 이런식으로 넣어서 해보실수 있을까요?
console.log(error.message); 이런식으로 넣어서 해보실수 있을까요?
넵!
동일하네요...


catch 쪽 코딩을 잘못하신것 같은데요.

이런식으로 해보세요.
위젯에서 체인으로 걸어보란말씀이신거죠?
try로 감싸지말고?
requestpayment 의 catch로 잡으셔야 합니다.
아 넵 알겠습니다
오 로그찍혔습니다!
감사합니다!!
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.