stripe-terminal-android
stripe-terminal-android copied to clipboard
Android Tap to Pay screen stuck in "Done" state
Summary
Using Tap to Pay with a test mode Stripe account and physical Stripe Terminal test card. The Tap to Pay target area turns green, along with the background, however the target area then reverts and the entire screen is then stuck appearing as the image attached below
Code to reproduce
Cordova plugin
public void connectToLocalReader(String locationId, String connectedAccountId, final CallbackContext callbackContext) {
LocalMobileConnectionConfiguration config = new LocalMobileConnectionConfiguration(locationId);
Terminal.getInstance().connectLocalMobileReader(localMobileReader, config, new ReaderCallback() {
@Override
public void onSuccess(Reader r) {
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));
}
@Override
public void onFailure(@NonNull TerminalException e) {
logger.e("Error in StripeTerminal connectLocalMobileReader", e);
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR));
}
});
}
private void collectPaymentMethod(String intentSecret, final CallbackContext callbackContext) {
Terminal.getInstance().retrievePaymentIntent(intentSecret,
new PaymentIntentCallback() {
@Override
public void onSuccess(PaymentIntent paymentIntent) {
Cancelable cancelable = Terminal.getInstance().collectPaymentMethod(paymentIntent,
new PaymentIntentCallback() {
@Override
public void onSuccess(PaymentIntent paymentIntent) {
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, paymentIntent.getId()));
}
@Override
public void onFailure(TerminalException exception) {
logger.e("Error in StripeTerminal collectPaymentMethod", exception);
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR));
}
},
new CollectConfiguration.Builder().build()
);
}
@Override
public void onFailure(TerminalException exception) {
logger.e("Error in StripeTerminal retrievePaymentIntent", exception);
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR));
}
}
);
}
Android version
11
Impacted devices (Android devices or readers)
Galaxy A12 Tap to Pay
SDK version
3.2.1
Other information
Hi @akarimcheese -- we are not able to reproduce this issue. Can you confirm that it reproduces every time you make a tap-to-pay payment, and can you try with the latest release (3.5.0)?
I don't think there would be any problems running using Cordova.
Hi @akarimcheese -- we are not able to reproduce this issue. Can you confirm that it reproduces every time you make a tap-to-pay payment, and can you try with the latest release (3.5.0)?
I don't think there would be any problems running using Cordova.
It does not happen every time I make a tap-to-pay payment. It happens if I move the card away from the phone while it is being read. At the moment I can't try this with the latest release due to Cordova build target limitations, however we are moving away from Cordova and I can try with the latest version once that effort is complete.