customerKey 가 반드시 필요한가요?
오프라인 qr에서 결제페이지로 연동 테스트를 해보고 있습니다.
회원결제가 존재하지 않는다면
const payment = tossPayments.payment({customerKey: TossPayments.ANONYMOUS})
이런식으로 생성 후 밑 처럼 하면 문제 없나요?
await payment.requestPayment({
method: "CARD", // 카드 결제
amount: {
currency: "KRW",
value: Number(price),
},
orderId: generateKey(),
orderName: $('#prdNm').text(),
successUrl: window.location.href + '/success', // 결제 요청이 성공하면 리다이렉트되는 URL
failUrl: window.location.href + '/fail', // 결제 요청이 실패하면 리다이렉트되는 URL
customerEmail: null,
customerName: null,
customerMobilePhone: null,
// 카드 결제에 필요한 정보
card: {
useEscrow: false,
flowMode: "DEFAULT", // 통합결제창 여는 옵션
useCardPoint: false,
useAppCardOnly: false,
},
});
회원결제가 존재하지 않는다면
const payment = tossPayments.payment({customerKey: TossPayments.ANONYMOUS})
이런식으로 생성 후 밑 처럼 하면 문제 없나요?
await payment.requestPayment({
method: "CARD", // 카드 결제
amount: {
currency: "KRW",
value: Number(price),
},
orderId: generateKey(),
orderName: $('#prdNm').text(),
successUrl: window.location.href + '/success', // 결제 요청이 성공하면 리다이렉트되는 URL
failUrl: window.location.href + '/fail', // 결제 요청이 실패하면 리다이렉트되는 URL
customerEmail: null,
customerName: null,
customerMobilePhone: null,
// 카드 결제에 필요한 정보
card: {
useEscrow: false,
flowMode: "DEFAULT", // 통합결제창 여는 옵션
useCardPoint: false,
useAppCardOnly: false,
},
});
