Closed thelight413 closed 8 months ago
Hi there -- can you confirm that you did all of the following?
OfflineListener
on the Terminal SDK.Yes I did both. I enabled offline for the entire account and set the offline listener on the SDK. Does it make a difference if I'm using a Connect account?
Ah, I should have caught this sooner -- please upgrade to 3.3.0. There was an offline-related bug in 3.2.1, so we've proactively reached out to existing users on that version and disabled it for new users.
@thelight413 we will be closing this ticket due to inactivity, if you have any further issues, please do not hesitate to open up a new ticket.
class=TerminalSession (Ask Gemini) com.stripe.stripeterminal.external.models.TerminalException: Failed to create payment offline. This reader is not configured to operate offline. at com.stripe.stripeterminal.internal.common.resourcerepository.DirectResourceRepositoryRouter.createPaymentIntent(DirectResourceRepositoryRouter.kt:89) at com.stripe.stripeterminal.internal.common.resourcerepository.ProxyResourceRepository$createPaymentIntent$1.invoke(ProxyResourceRepository.kt:62) at com.stripe.stripeterminal.internal.common.resourcerepository.ProxyResourceRepository$createPaymentIntent$1.invoke(ProxyResourceRepository.kt:61) at com.stripe.stripeterminal.internal.common.resourcerepository.ProxyResourceRepository.withCurrentRepository(ProxyResourceRepository.kt:157) at com.stripe.stripeterminal.internal.common.resourcerepository.ProxyResourceRepository.createPaymentIntent(ProxyResourceRepository.kt:61) at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$CreatePaymentIntentOperation.execute(TerminalSession.kt:1900) at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$ExternalOperation.run$terminalsession_release(TerminalSession.kt:1087) at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession.enqueueOperation$lambda$6(TerminalSession.kt:941) at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession.$r8$lambda$9_FdDGpM1BaifeFRjKBBfCCLP6o(Unknown Source:0) at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) getting this error for offline payment for stripe s700
using thiis dependancy
stripeterminalHandoffclient = "3.9.3" stripeterminalCore = "3.9.3" stripeterminal-core = { module = "com.stripe:stripeterminal-core", version.ref = "stripeterminalCore" } stripeterminal-handoffclient = { module = "com.stripe:stripeterminal-handoffclient", version.ref = "stripeterminalHandoffclient" }
here is my configurations
val offlineBehavior = if (amount > 1000000) { OfflineBehavior.REQUIRE_ONLINE } else { if (NetworkUtil.isInternetAvailable(requireContext())) OfflineBehavior.PREFER_ONLINE else OfflineBehavior.FORCE_OFFLINE } val createConfig = CreateConfiguration(offlineBehavior)
Terminal.getInstance()
.createPaymentIntent(params, createPaymentIntentCallback, createConfig)
Summary
I'm getting an issue with implementing Offline behavior on the app. When creating a payment intent, I set the offline behavior to FORCE_OFFLINE so I can test the offline but I get an error "Failed to create payment offline. This reader is not configured to operate offline".
Code to reproduce
`public void createPaymentIntent(ReadableMap options) { if (options != null) { if (options.hasKey(CURRENCY)) lastCurrency = options.getString(CURRENCY); } HashMap<String, String> metadata = new HashMap<>(); metadata.put("unique-id", UUID.randomUUID().toString()); PaymentIntentParameters.Builder paramsBuilder = getPaymentParams(options); paramsBuilder.setMetadata(metadata); OfflineBehavior offlineBehavior = OfflineBehavior.FORCE_OFFLINE; final CreateConfiguration createConfig = new CreateConfiguration(offlineBehavior);
Android version
Android 14
Impacted devices (Android devices or readers)
Stripe Reader M2
SDK version
implementation "com.stripe:stripeterminal-localmobile:3.2.1" implementation "com.stripe:stripeterminal-core:3.2.1"
Other information