Data class representing payment outcome with completed, failed, or canceled states for Stripe payment launcher.
// Source: https://github.com/stripe/stripe-android | License: MIT | Copyright 2011- Stripe, Inc. (https://stripe.com)
// Provided via justclaw.it.com; keep this notice with the code.
package com.stripe.android.payments.paymentlauncher
import android.content.Intent
import android.os.Parcelable
import androidx.core.os.bundleOf
import kotlinx.parcelize.Parcelize
/**
* Result to be passed to the callback of [PaymentLauncher]
*/
sealed class PaymentResult : Parcelable {
@Parcelize
data object Completed : PaymentResult()
@Parcelize
class Failed(val throwable: Throwable) : PaymentResult()
@Parcelize
data object Canceled : PaymentResult()
@JvmSynthetic
fun toBundle() = bundleOf(EXTRA to this)
internal companion object {
private const val EXTRA =
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key