iZettle / sdk-android

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/android-sdk
24 stars 20 forks source link

Frozen Modal when starting payment for logged out user #5

Closed pc-coholic closed 4 years ago

pc-coholic commented 4 years ago

Expected Behavior

When starting a payment intent for a user that is not logged in, a NotAuthorized exception should be thrown - as explained in the README.

Current Behavior

An empty modal is displayed with no way to close it. Only force-quitting the app will make it go away.

I would like to recommend to either actually raise the NotAuthorized-exception or - even better in my opinion - to just trigger the OAUTH login-process.

Steps to Reproduce

        val paymentIntent = CardPaymentActivity.IntentBuilder(activity)
                .amount((receipt_total * BigDecimal("100.00")).toLong())  // TODO: Does not work for 0-digit currencies
                .reference(reference)
                .enableTipping(false)
                .build()

        activity.startActivityForResult(paymentIntent, REQUEST_CODE_EFT_PAYMENT)

Of course we can (and are) wrapping the activity.startActivityForResult in a check if the user is logged in - but this should not be necessary, imho.

Context

dmilovanovi commented 4 years ago

Hey,

Thank you for reaching out to us.

Our team will have a look and we'll get back to you as soon as possible.

Kind regards.

pvoid commented 4 years ago

Fixed in version 1.8.3