Nets-mobile-acceptance / Netaxept-Android-SDK

PiA Netaxept Android SDK is a library that provides the native In-App interaction to perform Netaxept payments directly from an app on Android devices while minimizing PCI DSS requirements for you.
31 stars 15 forks source link

Crash when log off from MobilePay acc and try to pay #36

Closed DmytroKataryna closed 3 years ago

DmytroKataryna commented 3 years ago

E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-5 Process: com.myapp.test, PID: 8169 kotlin.KotlinNullPointerException at eu.nets.pia.wallets.Presenter.activity(Unknown Source:56) at eu.nets.pia.wallets.PiASDK.initiateMobileWallet(Unknown Source:29) at eu.nets.pia.PiaSDK.initiateMobileWallet(Unknown Source:0) at com.myapp.base.payment.PaymentManager.payWithMobileWallet(PaymentManager.kt:83) at com.myapp.basket.payment.CheckoutViewModel.placeOrder(CheckoutViewModel.kt:821) at com.myapp.basket.payment.CheckoutViewModel$placeOrder$1.invokeSuspend(Unknown Source:17) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

So in case user is not logged into MobilePay acc and trying to do payment initiateMobileWallet() method is throwing KotlinNullPointerException

public static boolean initiateMobileWallet(WalletPayment var0, boolean var1, WalletPaymentRegistration var2) { return PiASDK.initiateMobileWallet(var0, var1, var2); }

DmytroKataryna commented 3 years ago

Was resolved internally