Minsu Kim
Minsu Kim1h ago

V2 SDK 결제창 호출 시 타입 관련

await payment.requestPayment({
method: 'CARD',
amount: getTotalPrice(paymentMethod),
orderId,
orderName: `${reducer.ordererName}님 결제 [${orderId}]`,

successUrl: `${globalThis.location.origin}/payments/tosspayments/success`,
failUrl: `${globalThis.location.origin}/payments/tosspayments/fail`,

customerEmail: reducer.ordererEmail,
customerName: reducer.ordererName,
customerMobilePhone: reducer.ordererPhone,

card: {
useEscrow: false,
flowMode: 'DEFAULT',
},
})
await payment.requestPayment({
method: 'CARD',
amount: getTotalPrice(paymentMethod),
orderId,
orderName: `${reducer.ordererName}님 결제 [${orderId}]`,

successUrl: `${globalThis.location.origin}/payments/tosspayments/success`,
failUrl: `${globalThis.location.origin}/payments/tosspayments/fail`,

customerEmail: reducer.ordererEmail,
customerName: reducer.ordererName,
customerMobilePhone: reducer.ordererPhone,

card: {
useEscrow: false,
flowMode: 'DEFAULT',
},
})
위와 같이 코드를 짰을 경우, method가 CARD이고 card 객체가 있음에도 타입 오류가 발생하고 있어 확인이 필요합니다.
No description
1 Reply
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(문제가 발생한 이미지나 전체 결제흐름 동영상을 첨부해주시면 빠른 분석을 받으실 수 있습니다.)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.

Did you find this page helpful?