checkout
fun checkout(session: AirwallexSession, paymentMethod: PaymentMethod, paymentConsent: PaymentConsent? = null, cvc: String? = null, additionalInfo: Map<String, String>? = null, flow: AirwallexPaymentRequestFlow? = null, listener: Airwallex.PaymentResultListener, saveCard: Boolean = false)
Checkout the payment. This should be the entry point to handle all checkout cases
Parameters
session
a AirwallexSession used to present the Checkout flow, required.
paymentMethod
a PaymentMethod used to present the Checkout flow, required.
paymentConsent
a PaymentConsent object used for the payment, optional. Must have a valid ID if provided.
cvc
the CVC of the Credit Card, optional.
additionalInfo
used by LPMs
flow
an AirwallexPaymentRequestFlow, currently only supporting AirwallexPaymentRequestFlow.IN_APP, optional.
listener
The callback of checkout
saveCard
whether card will be saved as a payment consent, optional.