diff --git a/sdk/src/main/java/com/iamport/sdk/data/chai/response/UserData.kt b/sdk/src/main/java/com/iamport/sdk/data/chai/response/UserData.kt index a73b0353..d9972bc9 100644 --- a/sdk/src/main/java/com/iamport/sdk/data/chai/response/UserData.kt +++ b/sdk/src/main/java/com/iamport/sdk/data/chai/response/UserData.kt @@ -2,9 +2,11 @@ package com.iamport.sdk.data.chai.response import com.iamport.sdk.data.sdk.PG +// PG정보가 없어도(회원가입 후 즉시 or PG 를 API 방식으로만 이용하는 경우 or 본인인증만 이용하는 경우) 에도 +// pg_id 가 null 로 해당 데이터가 하나는 무조건 있으므로 다 nullable 처리한다 ㅠ data class UserData( - val pg_provider: String?, // TODO: 2020-12-15 015 nullable 로 오는데.. 확인필요.. - val pg_id: String, + val pg_provider: String?, + val pg_id: String?, val sandbox: Boolean?, - val type: String, + val type: String?, ) \ No newline at end of file diff --git a/sdk/src/main/java/com/iamport/sdk/presentation/viewmodel/MainViewModel.kt b/sdk/src/main/java/com/iamport/sdk/presentation/viewmodel/MainViewModel.kt index e51b9432..01d2dbe3 100644 --- a/sdk/src/main/java/com/iamport/sdk/presentation/viewmodel/MainViewModel.kt +++ b/sdk/src/main/java/com/iamport/sdk/presentation/viewmodel/MainViewModel.kt @@ -121,7 +121,11 @@ class MainViewModel(private val bus: NativeLiveDataEventBus, private val reposit d("$this") when (first) { - JudgeStrategy.JudgeKinds.CHAI -> second?.let { repository.chaiStrategy.doWork(it.pg_id, third) } + JudgeStrategy.JudgeKinds.CHAI -> second?.let { + it.pg_id?.let { pgId -> + repository.chaiStrategy.doWork(pgId, third) + } + } JudgeStrategy.JudgeKinds.WEB, JudgeStrategy.JudgeKinds.CERT -> bus.webViewActivityPayment.postValue(Event(third)) else -> Logger.e("판단불가 $third")