Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

본인인증 CertificationData minAge 기능 문의 #119

Open
tkddbf7348 opened this issue Jan 3, 2024 · 8 comments
Open

본인인증 CertificationData minAge 기능 문의 #119

tkddbf7348 opened this issue Jan 3, 2024 · 8 comments

Comments

@tkddbf7348
Copy link

tkddbf7348 commented Jan 3, 2024

현재 danal 본인인증 방식을 사용하기 위해 테스트 중에 있습니다.

  IamportCertification(
        appBar: AppBar(
          title: const Text('아임포트 본인인증'),
        ),
        /* 웹뷰 로딩 컴포넌트 */
        initialChild: const Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              CircularProgressIndicator(),
            ],
          ),
        ),
        /* [필수입력] 가맹점 식별코드 */
        userCode: 'iamport',
        /* [필수입력] 본인인증 데이터 */
        data: CertificationData(
          pg: 'danal', // PG사
          merchantUid: const Uuid().v4(), // 주문번호
          minAge: 50, //테스트 용 50 -> 기능 확인될 경우 19로 변경
          mRedirectUrl: 'https://example.com',
        ),
        /* [필수입력] 콜백 함수 */
        callback: (Map<String, String> result) {
          Navigator.pop(context, true);
        },
      )

설명에 기재되어 있는 테스트 코드를 사용했습니다.

<질문사항>

  1. CertificationData 안에 company, carrier, name, phone은 없어도 true로 잘 반환되는 듯 하여 우선 제외해두었는데 괜찮을까요?
  2. minAge 속성은 정상 작동하고 있나요? 정상 작동하려면 어떻게 구현해야 하나요?
    (미성년자인 경우는 제외하도록 구현하려고 합니다.)
@anymate98
Copy link
Contributor

안녕하세요.

company는 회사명을 넣어주시면 되고 carrier, name, phone은 비워두면 본인인증창에서 선택하게 되므로 제외헤도 괜찮습니다.
minAge는 정상작동하며 숫자를 입력하면 pass앱에서 돌아오거나 한 후 인증완료를 눌렀을 때 인증실패라는 화면이 뜨게 됩니다. 다만 이때 닫기 버튼이 있는데 이것을 누르면 일반적인 결제/인증 도중 취소 케이스와 동일한 응답이 나오기 때문에 응답값만으로 구분하기는 어려울 것으로 보입니다.

@tkddbf7348
Copy link
Author

tkddbf7348 commented Jan 3, 2024

음 제가 테스트할 때는 인증실패라는 화면 없이 무조건 success값이 true로 들어와서, 다른 듯 합니다.

우선 정확한 response 값을 통해 코드 내에서 미성년자 구분 기능은 구현하기 어렵다는 말씀이 맞을까요?

@anymate98
Copy link
Contributor

혹시 다날 휴대본 본인인증을 사용하신 게 확실하신가요?

@tkddbf7348
Copy link
Author

pg : 'danal'로 속성 입력했는데, 왼쪽 상단에 KG 이니시스로 표시가 되고 있네요..!

@anymate98
Copy link
Contributor

포트원 관리자 콘솔에서 다날 휴대폰 본인인증 테스트 채널을 설정해주시고 그 계정의 userCode를 사용하여 테스트 하는 것을 추천드립니다.

@tkddbf7348
Copy link
Author

tkddbf7348 commented Jan 4, 2024

userCode: [가맹점코드], 
      data: CertificationData(
        pg: 'danal',
        merchantUid: const Uuid().v4(),
        minAge: 50,
        mRedirectUrl: 'https://example.com',
      ),

이 데이터로 호출했을 경우

I/flutter (24392): │ 🐛 {
I/flutter (24392): │ 🐛   "success": "false",
I/flutter (24392): │ 🐛   "imp_uid": "imp_172275273477",
I/flutter (24392): │ 🐛   "merchant_uid": "1111111111",
I/flutter (24392): │ 🐛   "error_code": "9015",
I/flutter (24392): │ 🐛   "error_msg": "다날 서버로부터 받은 응답이 올바르지 않습니다. [인증실패] 업체정보에 이상이 있습니다. 해당 서비스 업체로 문의하여 주십시오."
I/flutter (24392): │ 🐛 }

해당 에러가 반환됩니다.
현재 flutter 버전은 3.10.5, 라이브러리 버전은 0.10.10을 사용하고 있습니다.
제가 잘못 구현한 부분이 있는지 확인해주실 수 있나요?

@anymate98
Copy link
Contributor

아 해당 테스트 채널은 휴대폰 소액결제가 가능한 설정인 것 같습니다. 다시 확인해보니 원칙적으로 본인인증은 유료기 때문에 현재 테스트 채널을 제공하고 있지 않습니다. 다날에서 본인인증용 cpid 발급해서 테스트하셔야 할 것 같습니다.

@tkddbf7348
Copy link
Author

아 그렇군요. 자세한 설명 감사합니다 ! ㅎㅎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants