create
fun create(activity: ComponentActivity, paymentOptionCallback: PaymentOptionCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController
Create the FlowController when launching the payment sheet from an Activity.
Parameters
activity
the Activity that is presenting the payment sheet.
paymentOptionCallback
called when the customer's desired payment method changes. Called in response to the PaymentSheet#presentPaymentOptions()
paymentResultCallback
called when a PaymentSheetResult is available.
fun create(fragment: Fragment, paymentOptionCallback: PaymentOptionCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController
Create the FlowController when launching the payment sheet from a Fragment.
Parameters
fragment
the Fragment that is presenting the payment sheet.
paymentOptionCallback
called when the customer's PaymentOption selection changes.
paymentResultCallback
called when a PaymentSheetResult is available.