Closed murrple-1 closed 4 years ago
Is this happening only for "Cancelling" Action ?
Possibly removing the DropInRequestCode check should make it work under AdyenPaymentModule.kt in line 564,
if (requestCode == DropIn.DROP_IN_REQUEST_CODE && resultCode == Activity.RESULT_CANCELED)
Let me also run it and update you soon. Just giving a hint on the issue if it is just cancelling action.
On Android, there is not a "Cancel" button like on iOS. You either drag the pop-over off the screen, or you click off it to make it cancel. I have supplied a GIF to show behaviour.
I just sticked with the dropIn modal of adyen and had plans for customizing the ui where i thought of adding cancel button.
The BottomSheet State needs to be tracked to make the cancelling behaviour work.
Issue Fixed. Please test and let me know.
I haven't fully tested this due to some issues around the project in general, but initially this looks good. I will post back with an update further, hopefully soon.
After applying the pull request #7 manually to bypass the crash, I am seeing unexpected behaviour on Android.
When calling
startPayment()
withonError
set, cancelling the payment by clicking off the overlay does not call theonError
listener. This is different from how it's behaving on iOS, where pressingCancel
calls the listener withcode = "ERROR_CANCELLED"
anderror = "Transaction Cancelled"
.Similarly, calling
startPaymentPromise()
in this way:does not cause the catch block to be run. This is unexpected (though this is consistent with iOS, second issue incoming).