PaymentController

Functions

Link copied to clipboard
abstract suspend fun confirmAndAuthenticateAlipay(confirmPaymentIntentParams: ConfirmPaymentIntentParams, authenticator: AlipayAuthenticator, requestOptions: ApiRequest.Options): Result<PaymentIntentResult>

Confirm a Alipay PaymentIntent, authenticate it and return the PaymentIntent.

Link copied to clipboard
abstract suspend fun confirmWeChatPay(confirmPaymentIntentParams: ConfirmPaymentIntentParams, requestOptions: ApiRequest.Options): Result<WeChatPayNextAction>

Confirm the Stripe Intent for WeChat Pay, return WeChat Pay params from intent's next action

Link copied to clipboard
abstract suspend fun getAuthenticateSourceResult(data: Intent): Result<Source>

Get the Source's client_secret from data and use to retrieve the Source object with updated status.

Link copied to clipboard

Get the PaymentIntent's client_secret from data and use to retrieve the PaymentIntent object with updated status.

Link copied to clipboard
abstract suspend fun getSetupIntentResult(data: Intent): Result<SetupIntentResult>

Get the SetupIntent's client_secret from data and use to retrieve the SetupIntent object with updated status.

Link copied to clipboard
abstract suspend fun handleNextAction(host: AuthActivityStarterHost, stripeIntent: StripeIntent, requestOptions: ApiRequest.Options)

Determine which authentication mechanism should be used, or bypass authentication if it is not needed.

Register the ActivityResultLaunchers with the new ActivityResultCaller and callback.

Link copied to clipboard
abstract fun shouldHandlePaymentResult(requestCode: Int, data: Intent?): Boolean

Decide whether getPaymentIntentResult should be called.

Link copied to clipboard
abstract fun shouldHandleSetupResult(requestCode: Int, data: Intent?): Boolean

Decide whether getSetupIntentResult should be called.

Link copied to clipboard
abstract fun shouldHandleSourceResult(requestCode: Int, data: Intent?): Boolean

Decide whether getAuthenticateSourceResult should be called.

Link copied to clipboard
abstract suspend fun startAuth(host: AuthActivityStarterHost, clientSecret: String, requestOptions: ApiRequest.Options, type: PaymentController.StripeIntentType)
Link copied to clipboard
abstract suspend fun startAuthenticateSource(host: AuthActivityStarterHost, source: Source, requestOptions: ApiRequest.Options)
Link copied to clipboard
abstract suspend fun startConfirmAndAuth(host: AuthActivityStarterHost, confirmStripeIntentParams: ConfirmStripeIntentParams, requestOptions: ApiRequest.Options)

Confirm the Stripe Intent and resolve any next actions

Link copied to clipboard
abstract fun unregisterLaunchers()

Unregister the ActivityResultLaunchers, releasing the reference to Activity or Fragment.