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

SDK Crash on successWithTransactionIDAndRedirectURL (2.7.3) #85

Closed NFosnaric closed 9 months ago

NFosnaric commented 9 months ago

Hello,

We are experiencing an SDK crash when calling successWithTransactionIDAndRedirectURL. This issue has been consistent on the Test environment. After user inputs card data and the loading spinner is shown SDK calls registerPayment method after which a crash occurs.

Our implementation: Initialization:

CardProcess cardProcess = PaymentProcess.cardPayment(
               merchantIDAndEnvironmentPair(),
               Set.of(CardScheme.amex),
               amountAndCurrencyCodePair(),
               cardPaymentRegistration
       );

PiaInterfaceConfiguration.getInstance().setDisableSaveCardOption(true);
PiaInterfaceConfiguration.getInstance().setSaveCardSwitchDefault(true);

PiaSDK.startCardProcessActivity(
         cardPaymentActivityLauncher,
         cardProcess,
         true
        );

Card Payment Registration:

CardPaymentRegistration cardPaymentRegistration = new CardPaymentRegistration() {
        @Override
        public void registerPayment(boolean shouldStoreCard, @NotNull TransactionCallback callbackWithTransaction) {
            callbackWithTransaction.successWithTransactionIDAndRedirectURL(paymentState.getPaymentId(), Uri.parse(paymentState.getRedirectUrl()));
        }
    };

Stacktrace:

FATAL EXCEPTION: main
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at b.c.onResponse(Unknown Source:376)
at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$retrofit2-DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:89)
at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1$$ExternalSyntheticLambda1.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7843)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Crash occurs on all devices and emulators. If you need any additional information I will gladly provide it.

Miss-PiA commented 9 months ago

Hi @NFosnaric ,

As we are trying to reproduce the issue on our side, could you please provide exact values of transactionId as well as redirectUrl that is used to reproduce the faulty scenario? At the same time, could you please share your mechantID so that we can trace to your failure transaction?

Thanks!

NFosnaric commented 9 months ago

Hi @Miss-PiA ,

As we have been in touch with your support team, we have forwarded all data (redirectUrl, transactionIds and merchandIDs) to the email ecom-dk@nets.eu We have had this issue happen on multiple merchants.

Thank you!

Miss-PiA commented 9 months ago

Hi @NFosnaric ,

That‘s a good idea to go through our customer service channel and let’s follow up your case there instead. So, I will close this ticket.

Miss-PiA