You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After everything is successful, I go to the payment screen, my card is read, I see the big green tick icon and I hear the successful sound, nothing else happens. I keep stuck in the colorful background of the stripe terminal device without being able to do anything else. If I want to run the app again I have to run it again from android studio.
I haven't modified anything in the code except to hardcoding my connected account id, location id and terminal id. Also I changed the currency.
suspend fun createPaymentIntent(createPaymentIntentParams: Map<String, String>): Result<PaymentIntentCreationResponse> =
runCatching {
val newMap = createPaymentIntentParams.toMutableMap()
newMap["connected_account_id"] = "my_acc_id"
newMap["terminal_id"] = "my_term_id"
newMap["location_id"] = "my_loc_id"
val response = service.createPaymentIntent(newMap.toMap())
response ?: error("Failed to create PaymentIntent")
}
Also I have changed this private val config = DiscoveryConfiguration.HandoffDiscoveryConfiguration() to private val config = DiscoveryConfiguration.InternetDiscoveryConfiguration()
Other than that, the code remains untouched.
I want to insist that everything looks right in the logcat and after debugging. The problem starts after I should be receiving a paymentIntent after the payment has been correctly processed. I even receive the intent here but then nothing happens.
fun createPaymentIntent(
createPaymentParams: CreatePaymentParams,
onFailure: (FailureMessage) -> Unit
) {
viewModelScope.launch {
createAndProcessPaymentIntent(createPaymentParams.toMap())
.fold(
onSuccess = { paymentIntent ->
_currentPaymentIntent.update { paymentIntent } // the intent is received here
},
onFailure = {
val failureMessage = if (it is TerminalException) {
it.errorMessage
} else {
it.message ?: "Failed to collect payment"
}.let(::FailureMessage)
onFailure(failureMessage)
}
)
}
}
The intent has the proper status REQUIRES_CAPTURE but it's never collected in the fragment. If I replace: launchAndRepeatWithViewLifecycle with viewLifecycleOwner.lifecycleScope.launch in the fragment, the intent is even collected and
Summary
After everything is successful, I go to the payment screen, my card is read, I see the big green tick icon and I hear the successful sound, nothing else happens. I keep stuck in the colorful background of the stripe terminal device without being able to do anything else. If I want to run the app again I have to run it again from android studio.
Code to reproduce
I'm trying to run this example on a stripe terminal S700 dev kit: https://github.com/stripe-samples/terminal-apps-on-devices
I haven't modified anything in the code except to hardcoding my connected account id, location id and terminal id. Also I changed the currency.
Also I have changed this
private val config = DiscoveryConfiguration.HandoffDiscoveryConfiguration()
toprivate val config = DiscoveryConfiguration.InternetDiscoveryConfiguration()
Other than that, the code remains untouched.
I want to insist that everything looks right in the logcat and after debugging. The problem starts after I should be receiving a paymentIntent after the payment has been correctly processed. I even receive the intent here but then nothing happens.
The intent has the proper status REQUIRES_CAPTURE but it's never collected in the fragment. If I replace:
launchAndRepeatWithViewLifecycle
withviewLifecycleOwner.lifecycleScope.launch
in the fragment, the intent is even collected andis run to navigate to the next fragment where the app flow should continue, but nothing happens. No crashes, no nothing.
Android version
I can't see android version in the device but I think it's android 10. The updater version is
2.23.3.0
Impacted devices (Android devices or readers)
Only my S700 dev kit
SDK version
3.3.0 but I've also tried 3.6.0 and the problem remains the same.
The text was updated successfully, but these errors were encountered: