결제금액확인
button.addEventListener("click", function () {
// 결제를 요청하기 전에 orderId, amount를 서버에 저장하세요.
// 결제 과정에서 악의적으로 결제 금액이 바뀌는 것을 확인하는 용도입니다.
paymentWidget.requestPayment({
orderId: "1W_pCfO4rzG9szJEcThKe",
orderName: "토스 티셔츠 외 2건",
successUrl: window.location.origin + "/success",
failUrl: window.location.origin + "/fail",
customerEmail: "customer123@gmail.com",
customerName: "김토스",
customerMobilePhone: "01012341234",
});
결제요청전 주문번호, 결제금액 db에 저장 후
결제완료 시 백엔드 confirm 에서 최초 결제금액과
결과로 받은 결제금액을 비교해야하나요?
// 결제를 요청하기 전에 orderId, amount를 서버에 저장하세요.
// 결제 과정에서 악의적으로 결제 금액이 바뀌는 것을 확인하는 용도입니다.
paymentWidget.requestPayment({
orderId: "1W_pCfO4rzG9szJEcThKe",
orderName: "토스 티셔츠 외 2건",
successUrl: window.location.origin + "/success",
failUrl: window.location.origin + "/fail",
customerEmail: "customer123@gmail.com",
customerName: "김토스",
customerMobilePhone: "01012341234",
});
결제요청전 주문번호, 결제금액 db에 저장 후
결제완료 시 백엔드 confirm 에서 최초 결제금액과
결과로 받은 결제금액을 비교해야하나요?
