iamport / iamport-android

22 stars 6 forks source link

판단불가 에러가 뜹니다. #46

Closed chanjungkim closed 3 years ago

chanjungkim commented 3 years ago

샘플 앱이 예전엔 엄청 간단하게 되어있었는데, koin에다가 코멘트 정리도 안되어있고, 엄청 복잡하게 되어있네요...

외부 라이브러리(1.2.0)을 추가 하라고 되어있는데, 샘플앱에선 해당 dependency는 없고, 전혀 다른 모듈로 되어있어 해당 sdk 모듈을 현 프로젝트로 가져와 진행해봤습니다.

샘플 앱에서 잘 진행되는 데이터로 똑같이 넣었지만, 다음과 같은 에러로 진행이 되지 않습니다.

    {
      "error_msg": "Not found PG [ nice ] and any PG in your info.",
      "imp_success": false,
      "merchant_uid": "mcuid_aos_1636622458898",
      "success": false
    }
판단불가 Payment(userCode=imp19424728, tierCode=null,
iamPortRequest=IamPortRequest(pg='nice', pay_method='card', escrow=null,
merchant_uid='mcuid_aos_1636622458898', customer_uid=null, name=아임포트 Android SDK 결제 테스트,
amount='3000', custom_data=null, tax_free=null, currency=null, language=null, buyer_name=홍길동,
buyer_tel=null, buyer_email=null, buyer_addr=null, buyer_postcode=null, notice_url=null, display=null,
digital=null, vbank_due=null, app_scheme=null, biz_num=null, popup=null, naverPopupMode=null,
naverUseCfm=null, naverProducts=null, naverCultureBenefit=null, naverProductCode=null,
naverActionType=null, cultureBenefit=null, naverInterface=null,
m_redirect_url=http://detectchangingwebview/iamport/a, niceMobileV2=true), iamPortCertification=null)

코드를 들여다보니 strategy가 설정되지 않아 그런듯한데, 어떻게 해야하나요? 저는 일단, nicepay로 연결 테스트 하고자 합니다.

현재 구현한 상태는 다음과 같습니다,

class MyViewModel:ViewModel() {
  lateinit var pg:PG
  lateinit var payMethod:PayMethod
  var userCode = "imp19424728"
  var paymentName: String = "테스트 결제"
  var merchantUid: String = ""
  var amount: String = "1000"

  val resultCallback = MutableLiveData<Event<IamPortResponse>>()

  override fun onCleared() {
    Iamport.close()
    super.onCleared()
  }

  /**
   * SDK 에 결제 요청할 데이터 구성
   */
  fun createIamPortRequest():IamPortRequest {
    val request = IamPortRequest(
      pg = "nice",      // PG 사
      pay_method = "card",      // 결제수단
      name = "아임포트 Android SDK 결제 테스트",    // 주문명
      merchant_uid = getRandomCustomerUid(),  // 주문번호
      amount = "3000",     // 결제금액
      buyer_name = "홍길동",
    )
    return request
  }

  private fun getRandomCustomerUid(): String {
    return "mcuid_aos_${Date().time}"
  }
}

Activity

class MyActivity: BaseActivity(){
  ...
  private fun init() {
    Iamport.init(this)
    binding.btnPay.setOnClickListener{onClickPayment()}
  }
  private fun onClickPayment() {
    val userCode = viewModel.userCode
    val request = viewModel.createIamPortRequest()
    Iamport.payment(userCode, iamPortRequest = request) { // TODO: }
  }
}

Application

class MyApplication:Application() {
  override fun onCreate() {
    super.onCreate()
    Iamport.create(this)
  }
}
kjh5833 commented 3 years ago

안녕하세요. 아임포트 기술지원팀입니다.

이용에 불편을 드려 죄송합니다.

"Not found PG [ nice ] and any PG in your info." 해당 에러는 아임포트 js sdk 에 결제요청 전 아임포트 API 를 통해 가맹점의 user code 를 이용하여 실제로 해당 pg 가 있는지 여부를 확인하는 작업에서 발생한 오류입니다.

해당 API 는 GET https://service.iamport.kr/users/pg/{usercode} 이며, 실제로 https://service.iamport.kr/users/pg/imp19424728 으로 조회하였을 때 PG 리스트가 나오는 것으로 보아 해당 에러가 나오면 안되는 상황인데요. 100% 발생하시는지요?

또한 기존 Deprecated 된 예제는 단순히 아임포트 js sdk 를 웹뷰에 load 하고, intent url 이 내려오면 앱을 열어주는 단순한 기능만 제공했기에 코드가 간략했던 것이며, 본 repo 는 기존 기능을 비롯한 플러그인화와 UI 상 여러가지 편의를 제공하기 위해 기존 예제 기준으로는 복잡해 보일 수 있습니다. 이부분 양해 부탁드립니다.

감사합니다.

kjh5833 commented 3 years ago

또한 외부 라이브러리(1.2.0)을 추가 하라고 되어있는데, 샘플앱에선 해당 dependency는 없고, 전혀 다른 모듈로 되어있어 해당 sdk 모듈을 현 프로젝트로 가져와 진행해봤습니다. 이 부분이 잘 이해가 되지 않는데, 상세 설명 부탁드립니다.

chanjungkim commented 3 years ago

샘플앱을 열어보니 dependency에 1.2.0 버전 라이브러리가 없고 sdk이란 이름의 모듈을 사용하고 있더라구요. 그래서 이걸 제 쪽 프로젝트에 가져와서 진행했습니다.

그리고 6시간 넘게 이것저것 해봤는데, 100퍼센트 발생합니다.

kjh5833 commented 3 years ago

예제 앱에선 편의를 위해 local 모듈을 참조하고 있습니다. 고객님께서 사용하실 땐 가이드에 명시된 대로 jitpack 세팅 및 아래 gradle 커맨드를 이용해 주시기 바랍니다. implementation 'com.github.iamport:iamport-android:v1.2.0'

또한 지속적으로 발생하신다면 logcat 로그 또한 전달 부탁드립니다.

kjh5833 commented 3 years ago

또한 문제가 되는 debug apk 전달 주시면 확인해보겠습니다. 상세 로그 확인 위해 이걸 제 쪽 프로젝트에 가져와서 진행했습니다. <- 해당 방법으로 빌드된 파일 전달 부탁드립니다. support@iamport.kr 감사합니다.

chanjungkim commented 3 years ago

로그 공유드립니다.

2021-11-12 00:18:56.611 16332-16332/? I/zygote64: Late-enabling -Xcheck:jni
2021-11-12 00:18:56.650 16332-16332/? W/zygote64: Unexpected CPU variant for X86 using defaults: x86_64
2021-11-12 00:18:56.611 16332-16332/? I/zygote64: Late-enabling -Xcheck:jni
2021-11-12 00:18:56.650 16332-16332/? W/zygote64: Unexpected CPU variant for X86 using defaults: x86_64
2021-11-12 00:18:56.611 16332-16332/? I/zygote64: Late-enabling -Xcheck:jni
2021-11-12 00:18:56.650 16332-16332/? W/zygote64: Unexpected CPU variant for X86 using defaults: x86_64
2021-11-12 00:18:56.841 16332-16332/com.example.dev I/[Koin]: [init] declare Android Context
2021-11-12 00:18:56.848 16332-16332/com.example.dev I/[Koin]: loaded 15 definitions - 1.182 ms
2021-11-12 00:18:56.849 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:18:56.850 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:18:56.850 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:18:56.850 16332-16332/com.example.dev D/IAMPORT: │ Iamport.create  (Iamport.kt:94)
2021-11-12 00:18:56.850 16332-16332/com.example.dev D/IAMPORT: │    Iamport.createWithKoin$default  (Iamport.kt:101)
2021-11-12 00:18:56.850 16332-16332/com.example.dev D/IAMPORT: │       Iamport.createWithKoin  (Iamport.kt:138)
2021-11-12 00:18:56.850 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:18:56.850 16332-16332/com.example.dev D/IAMPORT: │ Create IAMPORT SDK
2021-11-12 00:18:56.850 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:18:57.096 16332-16358/com.example.dev D/OpenGLRenderer: HWUI GL Pipeline
2021-11-12 00:18:57.161 16332-16358/com.example.dev I/zygote64: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2021-11-12 00:18:57.161 16332-16358/com.example.dev I/OpenGLRenderer: Initialized EGL, version 1.4
2021-11-12 00:18:57.161 16332-16358/com.example.dev D/OpenGLRenderer: Swap behavior 1
2021-11-12 00:18:57.161 16332-16358/com.example.dev W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2021-11-12 00:18:57.161 16332-16358/com.example.dev D/OpenGLRenderer: Swap behavior 0
2021-11-12 00:18:57.172 16332-16358/com.example.dev D/EGL_emulation: eglCreateContext: 0x7657f3c5bb20: maj 3 min 0 rcv 3
2021-11-12 00:18:57.175 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:18:57.264 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:18:58.701 16332-16337/com.example.dev I/zygote64: Do partial code cache collection, code=15KB, data=20KB
2021-11-12 00:18:58.701 16332-16337/com.example.dev I/zygote64: After code cache collection, code=15KB, data=20KB
2021-11-12 00:18:58.701 16332-16337/com.example.dev I/zygote64: Increasing code cache capacity to 128KB
2021-11-12 00:18:58.702 16332-16337/com.example.dev I/zygote64: Compiler allocated 5MB to compile void android.view.ViewRootImpl.performTraversals()
2021-11-12 00:19:00.964 16332-16337/com.example.dev I/zygote64: Do partial code cache collection, code=61KB, data=51KB
2021-11-12 00:19:00.965 16332-16337/com.example.dev I/zygote64: After code cache collection, code=61KB, data=51KB
2021-11-12 00:19:00.966 16332-16337/com.example.dev I/zygote64: Increasing code cache capacity to 256KB
2021-11-12 00:19:07.318 16332-16332/com.example.dev I/Choreographer: Skipped 310 frames!  The application may be doing too much work on its main thread.
2021-11-12 00:19:07.327 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:07.493 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:12.796 16332-16337/com.example.dev I/zygote64: Do full code cache collection, code=96KB, data=110KB
2021-11-12 00:19:12.797 16332-16337/com.example.dev I/zygote64: After code cache collection, code=93KB, data=84KB
2021-11-12 00:19:12.897 16332-16337/com.example.dev I/zygote64: Do partial code cache collection, code=124KB, data=115KB
2021-11-12 00:19:12.898 16332-16337/com.example.dev I/zygote64: After code cache collection, code=124KB, data=115KB
2021-11-12 00:19:12.898 16332-16337/com.example.dev I/zygote64: Increasing code cache capacity to 512KB
2021-11-12 00:19:12.913 16332-16337/com.example.dev I/zygote64: JIT allocated 53KB for compiled code of void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int)
2021-11-12 00:19:12.913 16332-16337/com.example.dev I/zygote64: Compiler allocated 4MB to compile void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int)
2021-11-12 00:19:13.027 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:13.030 16332-16337/com.example.dev I/zygote64: Do full code cache collection, code=244KB, data=172KB
2021-11-12 00:19:13.031 16332-16337/com.example.dev I/zygote64: After code cache collection, code=228KB, data=123KB
2021-11-12 00:19:14.775 16332-16337/com.example.dev I/zygote64: Do partial code cache collection, code=231KB, data=169KB
2021-11-12 00:19:14.775 16332-16337/com.example.dev I/zygote64: After code cache collection, code=231KB, data=169KB
2021-11-12 00:19:14.775 16332-16337/com.example.dev I/zygote64: Increasing code cache capacity to 1024KB
2021-11-12 00:19:14.775 16332-16337/com.example.dev I/zygote64: JIT allocated 71KB for compiled code of void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
2021-11-12 00:19:14.775 16332-16337/com.example.dev I/zygote64: Compiler allocated 7MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
2021-11-12 00:19:14.822 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:16.274 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:16.330 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:16.365 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:16.374 16332-16358/com.example.dev I/chatty: uid=10063(com.example.dev) RenderThread identical 1 line
2021-11-12 00:19:16.396 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:16.398 16332-16358/com.example.dev D/OpenGLRenderer: endAllActiveAnimators on 0x7657e197cc00 (RippleDrawable) with handle 0x7657f3d5b760
2021-11-12 00:19:16.864 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:18.163 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:18.164 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:18.164 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:18.164 16332-16332/com.example.dev D/IAMPORT: │ MatchResultActivity.onCreate  (MatchResultActivity.kt:47)
2021-11-12 00:19:18.164 16332-16332/com.example.dev D/IAMPORT: │    MatchResultActivity.init  (MatchResultActivity.kt:51)
2021-11-12 00:19:18.164 16332-16332/com.example.dev D/IAMPORT: │       Iamport.init  (Iamport.kt:210)
2021-11-12 00:19:18.164 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:18.164 16332-16332/com.example.dev D/IAMPORT: │ INITIALIZE IAMPORT SDK from activity
2021-11-12 00:19:18.165 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:18.177 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:18.177 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:18.178 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:18.180 16332-16332/com.example.dev D/IAMPORT: │ Activity.onStart  (Activity.java:1245)
2021-11-12 00:19:18.180 16332-16332/com.example.dev D/IAMPORT: │    Application.dispatchActivityStarted  (Application.java:207)
2021-11-12 00:19:18.180 16332-16332/com.example.dev D/IAMPORT: │       ScreenChecker.onActivityStarted  (ScreenChecker.kt:72)
2021-11-12 00:19:18.180 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:18.180 16332-16332/com.example.dev D/IAMPORT: │ app is 포그라운드! 살아왔다
2021-11-12 00:19:18.180 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:18.274 16332-16332/com.example.dev W/RecyclerView: No adapter attached; skipping layout
2021-11-12 00:19:18.296 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:18.332 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:18.347 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:18.355 16332-16358/com.example.dev I/chatty: uid=10063(com.example.dev) RenderThread identical 1 line
2021-11-12 00:19:18.366 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:18.367 16332-16358/com.example.dev D/OpenGLRenderer: endAllActiveAnimators on 0x7657e5868800 (RippleDrawable) with handle 0x7657e3f3e6c0
2021-11-12 00:19:18.379 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:18.379 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:18.379 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:18.379 16332-16332/com.example.dev D/IAMPORT: │ Activity.onStop  (Activity.java:1862)
2021-11-12 00:19:18.380 16332-16332/com.example.dev D/IAMPORT: │    Application.dispatchActivityStopped  (Application.java:234)
2021-11-12 00:19:18.380 16332-16332/com.example.dev D/IAMPORT: │       ScreenChecker.onActivityStopped  (ScreenChecker.kt:84)
2021-11-12 00:19:18.380 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:18.381 16332-16332/com.example.dev D/IAMPORT: │ app is 백그라운드
2021-11-12 00:19:18.381 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:19.841 16332-16358/com.example.dev D/EGL_emulation: eglMakeCurrent: 0x7657f3c5bb20: ver 3 0 (tinfo 0x7657f3cc8bc0)
2021-11-12 00:19:20.017 16332-16332/com.example.dev D/mLog: createRequest: IamPortRequest(pg='nice', pay_method='card', escrow=null, merchant_uid='muid_aos_1636625253229', customer_uid=null, name=테스트 결제, amount='1000', custom_data=null, tax_free=null, currency=null, language=null, buyer_name=남궁안녕, buyer_tel=null, buyer_email=null, buyer_addr=null, buyer_postcode=null, notice_url=null, display=null, digital=null, vbank_due=null, app_scheme=null, biz_num=null, popup=null, naverPopupMode=null, naverUseCfm=null, naverProducts=null, naverCultureBenefit=null, naverProductCode=null, naverActionType=null, cultureBenefit=null, naverInterface=null, m_redirect_url=http://detectchangingwebview/iamport/a, niceMobileV2=true)
2021-11-12 00:19:20.017 16332-16332/com.example.dev I/SAMPLE: userCode :: imp19424728
2021-11-12 00:19:20.057 16332-16332/com.example.dev I/SAMPLE: {
      "amount": "1000",
      "buyer_name": "남궁안녕",
      "m_redirect_url": "http://detectchangingwebview/iamport/a",
      "merchant_uid": "muid_aos_1636625253229",
      "name": "테스트 결제",
      "niceMobileV2": true,
      "pay_method": "card",
      "pg": "nice"
    }
2021-11-12 00:19:20.058 16332-16332/com.example.dev D/mLog: userCode: imp19424728
2021-11-12 00:19:20.058 16332-16332/com.example.dev I/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.058 16332-16332/com.example.dev I/IAMPORT: │ Thread: main
2021-11-12 00:19:20.058 16332-16332/com.example.dev I/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.059 16332-16332/com.example.dev I/IAMPORT: │ Iamport$payment$1.invoke  (Iamport.kt:277)
2021-11-12 00:19:20.059 16332-16332/com.example.dev I/IAMPORT: │    Iamport.corePayment$iamport_debug  (Iamport.kt:323)
2021-11-12 00:19:20.059 16332-16332/com.example.dev I/IAMPORT: │       IamportSdk.initStart  (IamportSdk.kt:271)
2021-11-12 00:19:20.059 16332-16332/com.example.dev I/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.059 16332-16332/com.example.dev I/IAMPORT: │ HELLO I'MPORT SDK! for payment
2021-11-12 00:19:20.059 16332-16332/com.example.dev I/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.080 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.081 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.081 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.081 16332-16332/com.example.dev D/IAMPORT: │ Iamport.corePayment$iamport_debug  (Iamport.kt:323)
2021-11-12 00:19:20.081 16332-16332/com.example.dev D/IAMPORT: │    IamportSdk.initStart  (IamportSdk.kt:281)
2021-11-12 00:19:20.082 16332-16332/com.example.dev D/IAMPORT: │       IamportSdk.observeViewModel  (IamportSdk.kt:291)
2021-11-12 00:19:20.082 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.083 16332-16332/com.example.dev D/IAMPORT: │ {
2021-11-12 00:19:20.083 16332-16332/com.example.dev D/IAMPORT: │   "iamPortRequest": {
2021-11-12 00:19:20.084 16332-16332/com.example.dev D/IAMPORT: │     "amount": "1000",
2021-11-12 00:19:20.084 16332-16332/com.example.dev D/IAMPORT: │     "buyer_name": "남궁안녕",
2021-11-12 00:19:20.084 16332-16332/com.example.dev D/IAMPORT: │     "m_redirect_url": "http://detectchangingwebview/iamport/a",
2021-11-12 00:19:20.084 16332-16332/com.example.dev D/IAMPORT: │     "merchant_uid": "muid_aos_1636625253229",
2021-11-12 00:19:20.084 16332-16332/com.example.dev D/IAMPORT: │     "name": "테스트 결제",
2021-11-12 00:19:20.085 16332-16332/com.example.dev D/IAMPORT: │     "niceMobileV2": true,
2021-11-12 00:19:20.085 16332-16332/com.example.dev D/IAMPORT: │     "pay_method": "card",
2021-11-12 00:19:20.085 16332-16332/com.example.dev D/IAMPORT: │     "pg": "nice"
2021-11-12 00:19:20.085 16332-16332/com.example.dev D/IAMPORT: │   },
2021-11-12 00:19:20.085 16332-16332/com.example.dev D/IAMPORT: │   "userCode": "imp19424728"
2021-11-12 00:19:20.085 16332-16332/com.example.dev D/IAMPORT: │ }
2021-11-12 00:19:20.085 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.092 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.092 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.092 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.092 16332-16332/com.example.dev D/IAMPORT: │ IamportSdk.requestPayment$default  (IamportSdk.kt:398)
2021-11-12 00:19:20.092 16332-16332/com.example.dev D/IAMPORT: │    IamportSdk.requestPayment  (IamportSdk.kt:407)
2021-11-12 00:19:20.093 16332-16332/com.example.dev D/IAMPORT: │       Util.isInternetAvailable  (Util.kt:168)
2021-11-12 00:19:20.093 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.093 16332-16332/com.example.dev D/IAMPORT: │ [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&FOREGROUND LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -50]
2021-11-12 00:19:20.093 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.109 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.110 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.110 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.110 16332-16332/com.example.dev D/IAMPORT: │ MainViewModel$judgePayment$1.invokeSuspend  (MainViewModel.kt:110)
2021-11-12 00:19:20.110 16332-16332/com.example.dev D/IAMPORT: │    JudgeStrategy.judge  (JudgeStrategy.kt:36)
2021-11-12 00:19:20.110 16332-16332/com.example.dev D/IAMPORT: │       JudgeStrategy.apiGetUsers  (JudgeStrategy.kt:28)
2021-11-12 00:19:20.110 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.111 16332-16332/com.example.dev D/IAMPORT: │ try apiGetUsers
2021-11-12 00:19:20.111 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.141 16332-16377/com.example.dev D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-11-12 00:19:20.168 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.168 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.169 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.169 16332-16332/com.example.dev D/IAMPORT: │ IStrategy$DefaultImpls.failureFinish$default  (IStrategy.kt:22)
2021-11-12 00:19:20.169 16332-16332/com.example.dev D/IAMPORT: │    BaseStrategy.failureFinish  (BaseStrategy.kt:14)
2021-11-12 00:19:20.169 16332-16332/com.example.dev D/IAMPORT: │       IStrategy$DefaultImpls.failureFinish  (IStrategy.kt:23)
2021-11-12 00:19:20.170 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.170 16332-16332/com.example.dev D/IAMPORT: │ GenericError null null
2021-11-12 00:19:20.170 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.173 16332-16332/com.example.dev I/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.174 16332-16332/com.example.dev I/IAMPORT: │ Thread: main
2021-11-12 00:19:20.174 16332-16332/com.example.dev I/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.174 16332-16332/com.example.dev I/IAMPORT: │ IamportSdk$observeViewModel$1$1$1.invoke  (IamportSdk.kt:297)
2021-11-12 00:19:20.174 16332-16332/com.example.dev I/IAMPORT: │    IamportSdk.access$sdkFinish  (IamportSdk.kt:35)
2021-11-12 00:19:20.174 16332-16332/com.example.dev I/IAMPORT: │       IamportSdk.sdkFinish  (IamportSdk.kt:190)
2021-11-12 00:19:20.174 16332-16332/com.example.dev I/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.175 16332-16332/com.example.dev I/IAMPORT: │ SDK Finish
2021-11-12 00:19:20.175 16332-16332/com.example.dev I/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.175 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.175 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.175 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.176 16332-16332/com.example.dev D/IAMPORT: │ IamportSdk$observeViewModel$1$1$1.invoke  (IamportSdk.kt:297)
2021-11-12 00:19:20.176 16332-16332/com.example.dev D/IAMPORT: │    IamportSdk.access$sdkFinish  (IamportSdk.kt:35)
2021-11-12 00:19:20.176 16332-16332/com.example.dev D/IAMPORT: │       IamportSdk.sdkFinish  (IamportSdk.kt:191)
2021-11-12 00:19:20.176 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.176 16332-16332/com.example.dev D/IAMPORT: │ IamPortResponse(imp_success=false, success=false, imp_uid=null, merchant_uid=muid_aos_1636625253229, error_msg=GenericError null null, error_code=null)
2021-11-12 00:19:20.176 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.177 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.179 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.179 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.179 16332-16332/com.example.dev D/IAMPORT: │ IamportSdk.sdkFinish  (IamportSdk.kt:194)
2021-11-12 00:19:20.179 16332-16332/com.example.dev D/IAMPORT: │    IamportSdk.initClearData  (IamportSdk.kt:213)
2021-11-12 00:19:20.180 16332-16332/com.example.dev D/IAMPORT: │       IamportSdk.clearMainViewModel  (IamportSdk.kt:203)
2021-11-12 00:19:20.180 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.180 16332-16332/com.example.dev D/IAMPORT: │ clearMainViewModel!
2021-11-12 00:19:20.180 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.192 16332-16337/com.example.dev I/zygote64: Do full code cache collection, code=504KB, data=325KB
2021-11-12 00:19:20.192 16332-16332/com.example.dev I/SAMPLE: 결제 결과 콜백
    {
      "error_msg": "GenericError null null",
      "imp_success": false,
      "merchant_uid": "muid_aos_1636625253229",
      "success": false
    }
2021-11-12 00:19:20.192 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.192 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.193 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.193 16332-16332/com.example.dev D/IAMPORT: │ IStrategy$DefaultImpls.failureFinish$default  (IStrategy.kt:22)
2021-11-12 00:19:20.193 16332-16332/com.example.dev D/IAMPORT: │    BaseStrategy.failureFinish  (BaseStrategy.kt:14)
2021-11-12 00:19:20.193 16332-16332/com.example.dev D/IAMPORT: │       IStrategy$DefaultImpls.failureFinish  (IStrategy.kt:23)
2021-11-12 00:19:20.193 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.194 16332-16332/com.example.dev D/IAMPORT: │ Not found PG [ nice ] and any PG in your info.
2021-11-12 00:19:20.194 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.195 16332-16332/com.example.dev I/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.196 16332-16332/com.example.dev I/IAMPORT: │ Thread: main
2021-11-12 00:19:20.196 16332-16332/com.example.dev I/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.196 16332-16332/com.example.dev I/IAMPORT: │ IamportSdk$observeViewModel$1$1$1.invoke  (IamportSdk.kt:297)
2021-11-12 00:19:20.196 16332-16332/com.example.dev I/IAMPORT: │    IamportSdk.access$sdkFinish  (IamportSdk.kt:35)
2021-11-12 00:19:20.197 16332-16332/com.example.dev I/IAMPORT: │       IamportSdk.sdkFinish  (IamportSdk.kt:190)
2021-11-12 00:19:20.197 16332-16332/com.example.dev I/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.197 16332-16332/com.example.dev I/IAMPORT: │ SDK Finish
2021-11-12 00:19:20.198 16332-16332/com.example.dev I/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.198 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.199 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.199 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.199 16332-16337/com.example.dev I/zygote64: After code cache collection, code=504KB, data=270KB
2021-11-12 00:19:20.199 16332-16332/com.example.dev D/IAMPORT: │ IamportSdk$observeViewModel$1$1$1.invoke  (IamportSdk.kt:297)
2021-11-12 00:19:20.200 16332-16332/com.example.dev D/IAMPORT: │    IamportSdk.access$sdkFinish  (IamportSdk.kt:35)
2021-11-12 00:19:20.200 16332-16332/com.example.dev D/IAMPORT: │       IamportSdk.sdkFinish  (IamportSdk.kt:191)
2021-11-12 00:19:20.200 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.200 16332-16332/com.example.dev D/IAMPORT: │ IamPortResponse(imp_success=false, success=false, imp_uid=null, merchant_uid=muid_aos_1636625253229, error_msg=Not found PG [ nice ] and any PG in your info., error_code=null)
2021-11-12 00:19:20.200 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.200 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.205 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.206 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.207 16332-16332/com.example.dev D/IAMPORT: │ IamportSdk.sdkFinish  (IamportSdk.kt:194)
2021-11-12 00:19:20.207 16332-16332/com.example.dev D/IAMPORT: │    IamportSdk.initClearData  (IamportSdk.kt:213)
2021-11-12 00:19:20.208 16332-16332/com.example.dev D/IAMPORT: │       IamportSdk.clearMainViewModel  (IamportSdk.kt:203)
2021-11-12 00:19:20.208 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.208 16332-16332/com.example.dev D/IAMPORT: │ clearMainViewModel!
2021-11-12 00:19:20.208 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.212 16332-16332/com.example.dev I/SAMPLE: 결제 결과 콜백
    {
      "error_msg": "Not found PG [ nice ] and any PG in your info.",
      "imp_success": false,
      "merchant_uid": "muid_aos_1636625253229",
      "success": false
    }
2021-11-12 00:19:20.214 16332-16332/com.example.dev D/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.215 16332-16332/com.example.dev D/IAMPORT: │ Thread: main
2021-11-12 00:19:20.215 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.215 16332-16332/com.example.dev D/IAMPORT: │ DispatchedTask.run  (DispatchedTask.kt:106)
2021-11-12 00:19:20.216 16332-16332/com.example.dev D/IAMPORT: │    BaseContinuationImpl.resumeWith  (ContinuationImpl.kt:33)
2021-11-12 00:19:20.216 16332-16332/com.example.dev D/IAMPORT: │       MainViewModel$judgePayment$1.invokeSuspend  (MainViewModel.kt:119)
2021-11-12 00:19:20.216 16332-16332/com.example.dev D/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.217 16332-16332/com.example.dev D/IAMPORT: │ (ERROR, null, Payment(userCode=imp19424728, tierCode=null, iamPortRequest=IamPortRequest(pg='nice', pay_method='card', escrow=null, merchant_uid='muid_aos_1636625253229', customer_uid=null, name=테스트 결제, amount='1000', custom_data=null, tax_free=null, currency=null, language=null, buyer_name=남궁안녕, buyer_tel=null, buyer_email=null, buyer_addr=null, buyer_postcode=null, notice_url=null, display=null, digital=null, vbank_due=null, app_scheme=null, biz_num=null, popup=null, naverPopupMode=null, naverUseCfm=null, naverProducts=null, naverCultureBenefit=null, naverProductCode=null, naverActionType=null, cultureBenefit=null, naverInterface=null, m_redirect_url=http://detectchangingwebview/iamport/a, niceMobileV2=true), iamPortCertification=null))
2021-11-12 00:19:20.217 16332-16332/com.example.dev D/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.218 16332-16332/com.example.dev E/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 00:19:20.218 16332-16332/com.example.dev E/IAMPORT: │ Thread: main
2021-11-12 00:19:20.218 16332-16332/com.example.dev E/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.219 16332-16332/com.example.dev E/IAMPORT: │ DispatchedTask.run  (DispatchedTask.kt:106)
2021-11-12 00:19:20.219 16332-16332/com.example.dev E/IAMPORT: │    BaseContinuationImpl.resumeWith  (ContinuationImpl.kt:33)
2021-11-12 00:19:20.220 16332-16332/com.example.dev E/IAMPORT: │       MainViewModel$judgePayment$1.invokeSuspend  (MainViewModel.kt:128)
2021-11-12 00:19:20.220 16332-16332/com.example.dev E/IAMPORT: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
2021-11-12 00:19:20.220 16332-16332/com.example.dev E/IAMPORT: │ 판단불가 Payment(userCode=imp19424728, tierCode=null, iamPortRequest=IamPortRequest(pg='nice', pay_method='card', escrow=null, merchant_uid='muid_aos_1636625253229', customer_uid=null, name=테스트 결제, amount='1000', custom_data=null, tax_free=null, currency=null, language=null, buyer_name=남궁안녕, buyer_tel=null, buyer_email=null, buyer_addr=null, buyer_postcode=null, notice_url=null, display=null, digital=null, vbank_due=null, app_scheme=null, biz_num=null, popup=null, naverPopupMode=null, naverUseCfm=null, naverProducts=null, naverCultureBenefit=null, naverProductCode=null, naverActionType=null, cultureBenefit=null, naverInterface=null, m_redirect_url=http://detectchangingwebview/iamport/a, niceMobileV2=true), iamPortCertification=null)
2021-11-12 00:19:20.220 16332-16332/com.example.dev E/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
kjh5833 commented 3 years ago

2021-11-12 00:19:20.170 16332-16332/com.example.dev D/IAMPORT: │ GenericError null null

위 부분에서 이미 에러가 발생하였습니다. 이전 댓글에서 말씀 드렸던 api 호출 자체가 안된 부분입니다.

api 객체를 inject 받아 사용하는데 로컬로 모듈을 가져오면서 그 부분에서 문제가 생긴 것은 아닐까 의심되네요.

본 repo 가이드대로 연동 후 테스트 해보시기 바랖니다.

이해가 어려우실 경우 아래 링크에 상세히 작성되어있으니 참고바랍니다. https://blog.iamport.kr/2021/06/02/android/

Deprecated 된 기존 예제앱과는 다르게 본 repo는 git clone 받아서 사용하는 방식이 아닙니다. 플러그인은 리모트에 업로드 된 상태이며, 가이드와 같이 gradle 을 통해 가맹점의 프로젝트에서 반영하실 수 있습니다.

감사합니다

chanjungkim commented 3 years ago

모듈 삭제 후 implementation 'com.github.iamport:iamport-android:1.2.0' 를 넣고 했는데도 같은 에러가 발생합니다. 혹시나 버전 앞에 v가 들어간 implementation 'com.github.iamport:iamport-android:v1.2.0'인지해서 이것도 넣어서 했는데 동일하게 발생합니다.

2021-11-12 10:37:11.456 1768-1801/system_process W/android.os.Debug: failed to get memory consumption info: -1
2021-11-12 10:37:13.232 16796-16863/io.monolabs.iam_untact I/TransportRuntime.CctTransportBackend: Status Code: 200
2021-11-12 10:37:13.232 16796-16863/io.monolabs.iam_untact I/TransportRuntime.CctTransportBackend: Content-Type: application/json; charset=UTF-8
2021-11-12 10:37:13.232 16796-16863/io.monolabs.iam_untact I/TransportRuntime.CctTransportBackend: Content-Encoding: gzip
2021-11-12 10:37:14.096 17328-17328/com.example.dev D/mono: createRequest: IamPortRequest(pg=nice, pay_method=card, escrow=null, merchant_uid=muid_aos_1636625253229, customer_uid=null, name=테스트 결제, amount=1000, custom_data=null, tax_free=null, currency=null, language=null, buyer_name=남궁안녕, buyer_tel=null, buyer_email=null, buyer_addr=null, buyer_postcode=null, notice_url=null, display=null, digital=null, vbank_due=null, app_scheme=null, biz_num=null, popup=null, naverPopupMode=null, naverUseCfm=null, naverProducts=null, naverCultureBenefit=null, naverProductCode=null, naverActionType=null, cultureBenefit=null, naverInterface=null)
2021-11-12 10:37:14.096 17328-17328/com.example.dev I/SAMPLE: userCode :: imp19424728
2021-11-12 10:37:14.099 17328-17328/com.example.dev I/SAMPLE: {
      "amount": "1000",
      "buyer_name": "남궁안녕",
      "m_redirect_url": "http://detectchangingwebview/iamport/a",
      "merchant_uid": "muid_aos_1636625253229",
      "name": "테스트 결제",
      "niceMobileV2": true,
      "pay_method": "card",
      "pg": "nice"
    }
2021-11-12 10:37:14.099 17328-17328/com.example.dev D/mono: userCode: imp19424728
2021-11-12 10:37:14.100 17328-17328/com.example.dev I/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 10:37:14.100 17328-17328/com.example.dev I/IAMPORT: │ HELLO I'MPORT SDK! for payment
2021-11-12 10:37:14.100 17328-17328/com.example.dev I/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 10:37:14.102 1436-3822/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 2251479069 , only wrote 2251478880
2021-11-12 10:37:14.148 1436-3822/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 2251481123 , only wrote 2251480320
2021-11-12 10:37:14.167 17328-17328/com.example.dev I/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 10:37:14.170 17328-17328/com.example.dev I/IAMPORT: │ SDK Finish
2021-11-12 10:37:14.170 17328-17328/com.example.dev I/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 10:37:14.173 17328-17328/com.example.dev I/SAMPLE: 결제 결과 콜백
    {
      "error_msg": "GenericError null null",
      "imp_success": false,
      "merchant_uid": "muid_aos_1636625253229",
      "success": false
    }
2021-11-12 10:37:14.174 17328-17328/com.example.dev I/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 10:37:14.174 17328-17328/com.example.dev I/IAMPORT: │ SDK Finish
2021-11-12 10:37:14.174 17328-17328/com.example.dev I/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 10:37:14.176 17328-17328/com.example.dev I/SAMPLE: 결제 결과 콜백
    {
      "error_msg": "Not found PG [ nice ] and any PG in your info.",
      "imp_success": false,
      "merchant_uid": "muid_aos_1636625253229",
      "success": false
    }
2021-11-12 10:37:14.177 17328-17328/com.example.dev E/IAMPORT: ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2021-11-12 10:37:14.177 17328-17328/com.example.dev E/IAMPORT: │ 판단불가 Payment(userCode=imp19424728, tierCode=null, iamPortRequest=IamPortRequest(pg=nice, pay_method=card, escrow=null, merchant_uid=muid_aos_1636625253229, customer_uid=null, name=테스트 결제, amount=1000, custom_data=null, tax_free=null, currency=null, language=null, buyer_name=남궁안녕, buyer_tel=null, buyer_email=null, buyer_addr=null, buyer_postcode=null, notice_url=null, display=null, digital=null, vbank_due=null, app_scheme=null, biz_num=null, popup=null, naverPopupMode=null, naverUseCfm=null, naverProducts=null, naverCultureBenefit=null, naverProductCode=null, naverActionType=null, cultureBenefit=null, naverInterface=null), iamPortCertification=null)
2021-11-12 10:37:14.177 17328-17328/com.example.dev E/IAMPORT: └────────────────────────────────────────────────────────────────────────────────────────────────────────────────

혹시 무조건 Fragment에 작성을 해야하는 건가요?

2021-11-12 00:19:20.170 16332-16332/com.example.dev D/IAMPORT: │ GenericError null null에러는 왜 발생하는 건가요?

chanjungkim commented 3 years ago
  1. Iamport.create(this)
  2. Iamport.init(this)
  3. Iamport.payment(userCode, iamPortRequest = request)

이 세가지 외엔 설정할 게 없는듯한데.. userCode, request는 위 로그에 나온대로구요.

kjh5833 commented 3 years ago

https://github.com/iamport/iamport-android/blob/ab7beb520ce26ac10d6d264c1506d7c990826c9a/sdk/src/main/java/com/iamport/sdk/data/remote/ApiHelper.kt#L30-L32

네트워크 통신 중 throwable 가 발생했을 때, IOException, HttpException 이 아닌 경우 발생합니다. Activity, Fragment 문제는 아닌 것으로 보입니다.

프로젝트 공유가 가능하시면 확인해보겠습니다.

chanjungkim commented 3 years ago

넵, 맞습니다. 이미지 있는 프로필 선택 > 매 화면의 하단 버튼 계속 선택하여 끝까지 이동 > 담당의사 배정 완료 화면에서 진료신청을 누르면 import api호출. 이렇게 됩니다.

kjh5833 commented 3 years ago

네 확인하였습니다. api inject 가 제대로 되어있지 않은것 같습니다. Iamport 객체를 사용하는 모든 부분 코드 부탁드립니다.

chanjungkim commented 3 years ago

Manifests.xml

    <application
        android:name=".MyApplication"
...

Appliicatiion

class MyApplication:Application() {
  override fun onCreate() {
    super.onCreate()
    Iamport.create(this)
  }
}

Activity

class MatchResultActivity:AppCompatActivity() {
  private lateinit var binding:ActivityMatchResultBinding
  private val viewModel by viewModels<MatchResultViewModel>()

  private val callBackListener = object:ICallbackPaymentResult {
    override fun result(iamPortResponse:IamPortResponse?) {
      val resJson = GsonBuilder().setPrettyPrinting().create().toJson(iamPortResponse)
      Log.i("SAMPLE", "결제 결과 콜백\n$resJson")
      PaymentResultData.result = iamPortResponse

      if(iamPortResponse != null) {
        viewModel.resultCallback.postValue(Event(iamPortResponse))
      }
    }
  }

  override fun onCreate(savedInstanceState:Bundle?) {
    super.onCreate(savedInstanceState)

    ActivityMatchResultBinding.inflate(layoutInflater).also {
      binding = it
      binding.lifecycleOwner = this
      setContentView(binding.root)
    }

    init()
  }

  private fun init() {
    Iamport.init(this)

    binding.run {
      layoutTopWithTitle.run {
        actvTopTitle.text = ""
        acimbtnBack.setOnClickListener {
          finish()
        }
      }

      val adapter = ExpPillAdapter(listOf(
        ExpPillItem("탈모약", "비대면 진료 후 처방 기간에 따라 변동"),
        ExpPillItem("사후피임", "10,000원 예상")
      ))
      rcvExpPill.adapter = adapter

    }

    binding.acibtnStartTreatment.setOnClickListener {view->
      onClickPayment()
    }
  }

  // 결제 버튼 클릭
  private fun onClickPayment() {
    val userCode = viewModel.userCode
    val request = viewModel.createIamPortRequest()
    Log.i("SAMPLE", "userCode :: $userCode")
    Log.i("SAMPLE", GsonBuilder().setPrettyPrinting().create().toJson(request))
    Log.d("mono", "userCode: ${userCode}")
    Iamport.payment(userCode, iamPortRequest = request) {callBackListener.result(it)}
  }

  override fun onDestroy() {
    super.onDestroy()
    Iamport.close()
  }
}

ViewModel

class MatchResultViewModel:ViewModel() {
  lateinit var pg:PG
  lateinit var payMethod:PayMethod
  var userCode = "imp19424728"
  var paymentName: String = "테스트 결제"
  var merchantUid: String = "muid_aos_1636625253229"
  var amount: String = "1000"

  val resultCallback = MutableLiveData<Event<IamPortResponse>>()

  init {
    pg = PG.nice
    payMethod = PayMethod.card
  }
  override fun onCleared() {
    Iamport.close()
    super.onCleared()
  }

  /**
   * SDK 에 결제 요청할 데이터 구성
   */
  fun createIamPortRequest(): IamPortRequest {
    val request = IamPortRequest(
      pg = pg.makePgRawName(pgId = ""),           // PG 사
      pay_method = payMethod.name,                // 결제수단
      name = paymentName,                         // 주문명
      merchant_uid = merchantUid,                 // 주문번호
      amount = amount,                            // 결제금액
      buyer_name = "남궁안녕",
//            customer_uid = getRandomCustomerUid() // 정기결제
    )
    Log.d("mono", "createRequest: ${request.toString()}")
    return request
  }

  private fun getRandomCustomerUid(): String {
    return "mcuid_aos_${Date().time}"
  }
}

이상입니다.

kjh5833 commented 3 years ago

특이점은 없어 보입니다.

예제앱은 잘 돌아간다고 확인 하셨고, 아래 링크대로 새 프로젝트를 만드셔서 해보셨는지요? https://blog.iamport.kr/2021/06/02/android/

요인이 있을 것 같은데, 재현이 되지 않아 프로젝트 전체 구조를 보지 않으면 디버깅이 어려울 것 같습니다.

chanjungkim commented 3 years ago

간단한 프로젝트를 새로 만들어 작업하고자 블로그를 참고하여 진행해보았습니다.

image

이미지를 보시는 것과 같이 pay_method = PayMethod.card 부분이 잘못되어있고, payment 안의 request 파라미터가 제대로 되어있지 않습니다.

그래서 다음과 같이 수정하고 진행을 하니 진행이 됐습니다.

    val userCode = "iamport"  // 가맹점식별코드, "iamport" 는 테스트용 코드임
    // SDK 에 결제 요청할 데이터
    val request = IamPortRequest(
      pg = PG.html5_inicis.makePgRawName(""),         // PG사
      pay_method = PayMethod.card.getPayMethodName(),                    // 결제수단
      name = "아임포트 진짜 쉬워요!",                      // 주문명
      merchant_uid = "sample_aos_${Date().time}",     // 주문번호
      amount = "1000",                                // 결제금액
      buyer_name = "김개발"
    )
    // 우측 하단 초록색 편지지 버튼 클릭
    binding.btn.setOnClickListener { view ->
      Snackbar.make(view, "아임포트에서 결제 해볼까요?", Snackbar.LENGTH_LONG)
        .setAction("결제") {
          // 아임포트에 결제 요청하기
          Iamport.payment("iamport", iamPortRequest = request, paymentResultCallback = {
            // 결제 완료 후 결과 콜백을 토스트 메시지로 보여줌
            Toast.makeText(this, "결제결과 => $it", Toast.LENGTH_LONG).show()
          })
        }.show()
    }

하지만 inicis로 되어있어 다음과 같이 나이스로 변경하여 진행해보았습니다.

  override fun onStart() {
    super.onStart()

    val userCode = "iamport"  // 가맹점식별코드, "iamport" 는 테스트용 코드임
    // SDK 에 결제 요청할 데이터
    val request = IamPortRequest(
      pg = PG.nice.makePgRawName(""),         // PG사
      pay_method = PayMethod.card.getPayMethodName(),                    // 결제수단
      name = "아임포트 진짜 쉬워요!",                      // 주문명
      merchant_uid = "sample_aos_${Date().time}",     // 주문번호
      amount = "1000",                                // 결제금액
      buyer_name = "김개발"
    )
    // 우측 하단 초록색 편지지 버튼 클릭
    binding.btn.setOnClickListener { view ->
      Snackbar.make(view, "아임포트에서 결제 해볼까요?", Snackbar.LENGTH_LONG)
        .setAction("결제") {
          // 아임포트에 결제 요청하기
          Iamport.payment("iamport", iamPortRequest = request, paymentResultCallback = {
            // 결제 완료 후 결과 콜백을 토스트 메시지로 보여줌
            Toast.makeText(this, "결제결과 => $it", Toast.LENGTH_LONG).show()
          })
        }.show()
    }
  }

그런데 여전히 KG 이니시스로 뜹니다. kakaopay로 변경해서 캐시도 지우고 다음과 같이 진행했지만 여전히 KG 이니시스로 됩니다.

테스트한 프로젝트 공유드립니다.

https://github.com/chanjungkim/import-sample

잘못된 부분이 있을까요?

chanjungkim commented 3 years ago

제 생각에는 현 프로젝트에 buildType과 flavor을 사용해서 뭔가 아임포트 sdk와 호환이 안 되는 거 같은데, 관련 이슈가 있을까요?

kjh5833 commented 3 years ago
kjh5833 commented 3 years ago

현 프로젝트가 이슈가 나오는 우주약방 말씀하시는지요? 고객님께서 어떤 컨피그를 사용하는지 알 수없어 특정 지점이 문제라고 말씀드리기 어렵습니다.

chanjungkim commented 3 years ago

네, 맞습니다.

그럼 테스트 앱은 설명해주신 게 맞게 제대로 동작하는게 맞네요.

우주약방 프로젝트에서는 flavor + buildType을 여러개 사용 중입니다. 전부 똑같이 작성을 했고, 다른 게 있다면 이 부분인데, 제 생각에는 이것 때문에 호환이 되지 않아 제대로 동작하지 않는 것으로 보입니다.

예를 들면, buildType = release/debug/emulator, flavor = development/product/beta 로 하여, developmentEmulator, betaDebug, betaRelease, productRelease 등으로 사용 중입니다.

userCode = "iamport"로 변경해서 진행해도 처음과 같은 에러가 발생합니다.

kjh5833 commented 3 years ago

고객님께서 올리신 샘플 프로젝트에서 이슈가 재현되는 케이스를 만들어주시면 검토해보도록 하겠습니다.

chanjungkim commented 3 years ago

전부 지우고 기본 컨피그로 했는데도 안 되네요...

kjh5833 commented 3 years ago

말씀주시는 정보만으로는 디버깅이 어려운 상황입니다.

kjh5833 commented 3 years ago

기존 프로젝트 코드를 쓰셔서 webview 에 직연동을 하실 수도 있으니 참고 부탁드립니다. https://github.com/iamport/iamport-nice-android-gradle

chanjungkim commented 3 years ago

새로 프로젝트를 만들어 진행했더니, 잘 작동합니다. 감사합니다. PG 심사 요청했습니다.

kjh5833 commented 3 years ago

새프로젝트 + 기존코드 + 아임포트 안드로이드 SDK 사용시 문제가 없으신건가요? 해결이 되셔서 다행이네요. 이슈 닫도록 하겠습니다.