Registering for iES

  1. Check the user’s registration status.
  2. Request the user’s registration.
  3. Have the password entered.
  4. Complete the registration.

Preparation for registration

Before registering for the iES service, perform user authentication in the user’s app. Call the “Member Integration” API when user authentication and other preparations are all complete.

Refer to Member Integration Guide: for more information about member integration.

User status check

Check the user’s registration status before proceeding with iES registration.
Determine the registration status based on the result of the API.
Refer to the reqProcJoin method in the MainActivity.java included in the sample app.

  private void reqCheckJoin() {
        String cus_id = mEtCusId.getText().toString();

        SPinManager.getInstance().reqCheckJoin(this, cus_id);
    }

Registration

Refer to the reqProcJoin method in the MainActivity.java included in the sample app.

    private void reqProcJoin() {
        String cus_no = mEtCusNo.getText().toString();
        String cus_id = mEtCusId.getText().toString();
        SPinManager.getInstance().reqJoin(this, mAuthToken,  mPushToken, cus_no, cus_id,  mSpEncKey);
    }

In the reqProcJoin method, mAuthToken received from member integration, mPushToken for push reception, cus_no (Customer Number), cus_id (Customer ID) and SpEncKey received from member integration are sent to the library through the SPinManager.
Now, let’s take a look at the reqJoin method in the SPinManager.

public void reqJoin(final Context ctx, final String auth_token,  final String push_token, final String cus_no, final String cus_id,  final String sp_enc_key) {
        // 라이브러리 결과 값 리스너
        final OneShotPadListener<SimpleResponse> l = new OneShotPadListener<SimpleResponse>() {
            @Override
            public void onResult(SimpleResponse res) {
                BaseResponse.printLog(res);
                showToast(ctx, res);
                // 결과 값 반환
            }
        };
        // 핀패드 리스너
        OnInputListener pinpadListener = new OnInputListener() {
            @Override
            public void onStep1Finished(PinpadDialog dlg) {
                dlg.setLabel1("비밀번호 입력 확인");
                dlg.setLabel2("비밀번호를 한번 더 입력하세요.");
            }

            @Override
            public void onInvalidInput(PinpadDialog dlg, int code) {
                String msg = "";
                switch (code) {
                    case InterfaceCodes.ERR_TOO_SHORT:
                        msg = "비밀번호는 4자리여야 합니다.";
                        break;
                    case InterfaceCodes.ERR_NOT_MATCH:
                        msg = "비밀번호가 일치하지 않습니다.";
                        break;
                }
                Toast.makeText(ctx, msg, Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onInputPw(PinpadDialog dlg, String pw) {
                dlg.dismiss();
                // 라이브러리 호출
                // RSA키 생성및 전자서명 전달
                OneShotPadManager.getInstance().reqProcJoinEx(ctx, auth_token,  push_token, cus_no, cus_id, pw,  sp_enc_key, l);
            }

            @Override
            public void onCanceled(PinpadDialog dlg) {
                dlg.dismiss();
            }
        };
        PinpadDialog dlg = PinpadDialog.getSetDialog(ctx, pinpadListener);
        dlg.setSubTitle("OneShotPad 가입");
        dlg.setLabel1("비밀번호 입력");
        dlg.setLabel2("비밀번호를 입력하세요.");
        dlg.show();
    }

In the reqJoin method in the SPinManager, the pinpad to be used for registration is displayed in the screen, the user’s input of the password is received, and the password is sent to the library with other values received.

Previous
Next