-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reader Disconnect issue #532
Comments
@VijayRathodM Thanks for bringing this to our attention, and I'm sorry to hear you're experiencing issues with the disconnectReader callbacks. To help us investigate this issue, could you please provide the following information?
In the meantime, as a workaround, you can implement the ReaderDisconnectListener in your application. This listener's onDisconnect() method will be called when the reader is disconnected, which can help you navigate back to the desired screen. |
Thanks for your support
Step 1 Step 2 Step 3
Step 4
// This method is not callback with any reason and we have implemented ReaderDisconnectListener method but not working
Note : When try to disconnect device there is no log are getting Logs |
any update ? |
Facing same issue while connecting via Usb on OEM devices |
any update? @sjl-stripe ? |
@Syedovaiss could you open a new ticket for your issue? When creating the ticket, information like the stack trace, reader serial number and reproduction steps will help us root cause the issue quicker. |
Hi @VijayRathodM, Thank you for the detailed information. After reviewing our logs, it appears that the issue is caused by unhandled NullPointerExceptions in your callback methods (specifically in onSuccess and onFailure). This can prevent the Terminal SDK from completing operations and invoking callbacks properly. Suggestion: Add try-catch blocks inside your val collectPaymentMethodCallback = object : PaymentIntentCallback {
override fun onSuccess(paymentIntent: PaymentIntent) {
try {
// Your success handling code
} catch (exception: Exception) {
Log.e("CollectPaymentMethod", "Exception in onSuccess", exception)
}
}
override fun onFailure(e: TerminalException) {
try {
// Your error handling code
} catch (exception: Exception) {
Log.e("CollectPaymentMethod", "Exception in onFailure", exception)
}
}
}
val processPaymentIntentCallback = object : PaymentIntentCallback {
override fun onSuccess(paymentIntent: PaymentIntent) {
try {
// Your success handling code
} catch (exception: Exception) {
Log.e("ProcessPaymentIntent", "Exception in onSuccess", exception)
}
}
override fun onFailure(e: TerminalException) {
try {
// Your error handling code
} catch (exception: Exception) {
Log.e("ProcessPaymentIntent", "Exception in onFailure", exception)
}
}
}
val disconnectReaderCallback = object : Callback {
override fun onSuccess() {
try {
// Your success handling code
} catch (exception: Exception) {
Log.e("DisconnectReader", "Exception in onSuccess", exception)
}
}
override fun onFailure(e: TerminalException) {
try {
// Your error handling code
} catch (exception: Exception) {
Log.e("DisconnectReader", "Exception in onFailure", exception)
}
}
}
// Handle exceptions for your other callbacks similarly Why This Helps:
Please try implementing these changes, and let us know if the issue persists. |
@sjl-stripe
|
@VijayRathodM thanks for trying out my recommendation. Just to confirm, have you tried adding the try/catch blocks to your other callbacks, like |
Yes, we have implemented try/catch blocks for every callback and set up terminal error logging, but no operations or actions are being logged. Just to confirm, is it possible for the reader to disconnect after creating a payment intent and getting ready to swipe or insert the card during this flow? This issue has been ongoing for a long time, so we request the Stripe team to take this matter seriously and provide a resolution.
|
@sjl-stripe any update ? |
1 similar comment
@sjl-stripe any update ? |
Hi @VijayRathodM appreciate the details provided and trying the suggested workaround. In the meantime, wondering if you can use the workaround suggested of implementing the ReaderDisconnectListener in your application - while not ideal, this should allow you to detect disconnects and navigate appropriately. Thanks |
@xiaoshen-stripe any update ? |
Summary
When reader is connect after we have one button to disconnect reader but there is not return callback, this issue major in Fragment , we need to call onSuccess after to back the screen but it is not possible
Code to reproduce
Step 1
Connect Reader Successfull
Step 2
Disconnect Button and click following callback
but not any callback method onSuccess or onFailure nothing to call
Android version
14
Impacted devices (Android devices or readers)
SDK version
4.0.0
Other information
The text was updated successfully, but these errors were encountered: