Adyen / adyen-android

Adyen Android Drop-in and Components
https://docs.adyen.com/checkout/android
MIT License
126 stars 66 forks source link

Google Pay is not shown again on dismiss of the error dialog #1800

Open jaejoong-yoo-gtg opened 1 week ago

jaejoong-yoo-gtg commented 1 week ago

Description

In a situation where DropInServiceResult.Error with an error dialog is passed to SDK after submitting Google Pay payments, Google Pay is not shown again on dismiss of the error dialog. And, it just stays in a blank screen. It navigates back to the payment methods list if I click on the back button. If it's hard to launch Google Pay again, it should go to the payment methods list at least, instead of staying in the middle of nowhere.

Steps to Reproduce

  1. I am able to consistently reproduce this issue: Yes
  2. Steps to reproduce the issue:
    1. Select Google Pay from payment methods list in DropIn
    2. Pay with a card that could fall into a case where DropInService would send an error result

Logs and Crash Reports

Code Snippets

This is a test code that will reproduce the issue all the time.

class PaymentsCheckoutService : DropInService() {
    override fun onSubmit(state: PaymentComponentState<*>) {
        launch {
            delay(500)
            sendResult(DropInServiceResult.Error(errorDialog = ErrorDialog(message = "error")))
        }
    }
}

Integration Information

  1. Server-side integration: Advanced flow
  2. Client-side integration: Drop-in
  3. SDK version: com.adyen.checkout:drop-in:5.6.0
  4. Android version(s) where issue occurs: API 34
  5. Device model(s) where issue occurs: Pixel 7a

Additional Context

N/A

OscarSpruit commented 1 week ago

Hi @jaejoong-yoo-gtg, thank you for reporting this bug! We were able to reproduce it and will look into a fix. We'll keep you updated on the progress.