오창현
오창현4w ago

필수 약관에 동의해주세요. 에러

결제 요청 시 “필수 약관에 동의해주세요.”라는 에러가 반환됩니다. 클라이언트 측에서 약관 동의 여부를 서버로 전달해야 하는 값이 따로 존재하나요?
No description
24 Replies
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.
이실장
이실장4w ago
저희가 내려드리는 에러메세지가 아닌 것 같은데요 어떤 제품 연동중이세요? 어떤 method에서 에러낫나요?
오창현
오창현OP4w ago
No description
오창현
오창현OP4w ago
ver2 위젯 에러 메세지로 있더라구요!
오창현
오창현OP4w ago
토스페이먼츠 SDK 에러 코드 | 토스페이먼츠 개발자...
토스페이먼츠 SDK를 사용할 때 발생할 수 있는 모든 에러를 살펴보세요.
이실장
이실장4w ago
약관위젯 렌더링하셨어요?
오창현
오창현OP4w ago
네네 했습니다!
이실장
이실장4w ago
결제요청할 때 체크하셨어요?
오창현
오창현OP4w ago
useEffect(() => { const renderPaymentWidgets = async () => { if (!widgets || hasRendered.current) return try { await widgets.setAmount({ currency: 'KRW', value: amount }) const [paymentMethodWidget, agreementWidget] = await Promise.all([ widgets.renderPaymentMethods({ selector: '#payment-method', variantKey: 'DEFAULT', }), widgets.renderAgreement({ selector: '#agreement', variantKey: 'AGREEMENT', }), ]) hasRendered.current = true paymentMethodWidget.on('paymentMethodSelect', (selectedPaymentMethod) => { console.warn('선택된 결제수단:', selectedPaymentMethod) setSelectedPaymentMethod(selectedPaymentMethod) if (selectedPaymentMethod.code === 'CARD') { console.warn('카드 결제 선택됨 - 즉시 완료 처리') } if (selectedPaymentMethod.code === 'VIRTUAL_ACCOUNT') { console.warn('가상계좌 선택됨 - 입금 대기 처리') } }) agreementWidget.on('agreementStatusChange', (agreementStatus) => { console.warn('약관 동의 상태:', agreementStatus.agreedRequiredTerms) }) const detectDefaultPaymentMethod = async () => { try { const currentPaymentMethod = await paymentMethodWidget.getSelectedPaymentMethod() console.warn('기본 선택된 결제수단:', currentPaymentMethod) if (currentPaymentMethod) { setSelectedPaymentMethod(currentPaymentMethod) } } catch (error) { const errorMessage = String(error) .replace(/^error:\s/i, '') .trim() // setPaymentFailureReason(errorMessage) router.push('/payment/failed') } } detectDefaultPaymentMethod() } catch (error) { console.log('🔍 너냐?23123121!error:', error) const errorMessage = String(error) .replace(/^error:\s/i, '') .trim() // setPaymentFailureReason(errorMessage) router.push('/payment/failed') } } renderPaymentWidgets() }, [widgets, amount, setPaymentFailureReason, router]) 네네 다 체크했습니다!
이실장
이실장4w ago
약관위젯 사용하지 말아보실래요?
오창현
오창현OP4w ago
No description
오창현
오창현OP4w ago
넵 잠시만요!! 했는데도 동일한 에러 나네요 ㅠㅠ
오창현
오창현OP4w ago
No description
이실장
이실장4w ago
No description
이실장
이실장4w ago
아예 렌더링하지 말아보세요
오창현
오창현OP4w ago
지금 렌더링 안되고 있어용!
오창현
오창현OP4w ago
No description
이실장
이실장4w ago
그런데 같은에러가 나나요?
오창현
오창현OP4w ago
네네 ㅠㅠ
이실장
이실장4w ago
모르겠네요
이실장
이실장4w ago
토스페이먼츠 개발자센터
토스페이먼츠 결제 연동 문서, API, 키, 테스트 내역, 웹훅 등록 등 개발에 필요한 정보와 기능을 확인해 보세요. 결제 연동에 필요한 모든 개발자 도구를 제공해 드립니다.
이실장
이실장4w ago
여기랑 한번 비교해보세요
오창현
오창현OP4w ago
네네!! 확인해보겠습니다!! 감사합니다~~
토스페이먼츠 BOT
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.

Did you find this page helpful?