SchemaPaymentViewModel
class SchemaPaymentViewModel(application: Application, airwallex: Airwallex, session: AirwallexSession) : AirwallexCheckoutViewModel
ViewModel for managing payment operations data. Handles fetching and storing payment methods and consents.
Types
Link copied to clipboard
class Factory(application: Application, airwallex: Airwallex, session: AirwallexSession) : ViewModelProvider.Factory
Link copied to clipboard
data class SchemaData(val fields: List<DynamicSchemaField> = emptyList(), val paymentMethod: PaymentMethod? = null, val typeInfo: PaymentMethodTypeInfo? = null, val banks: List<Bank> = emptyList())
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun checkout(paymentMethod: PaymentMethod, additionalInfo: Map<String, String>?, flow: AirwallexPaymentRequestFlow?): AirwallexPaymentStatus
suspend fun checkout(paymentMethod: PaymentMethod, paymentConsentId: String?, cvc: String, flow: AirwallexPaymentRequestFlow): AirwallexPaymentStatus
fun checkout(paymentMethod: PaymentMethod, paymentConsentId: String?, cvc: String?, additionalInfo: Map<String, String>?, flow: AirwallexPaymentRequestFlow?): LiveData<AirwallexPaymentStatus>
Link copied to clipboard
Link copied to clipboard
fun checkoutWithSchema(paymentMethod: PaymentMethod, additionalInfo: Map<String, String>, typeInfo: PaymentMethodTypeInfo): Job
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun loadSchemaFields(paymentMethodType: AvailablePaymentMethodType): Result<SchemaPaymentViewModel.SchemaData?>
Link copied to clipboard
Link copied to clipboard
suspend fun retrievePaymentMethodTypeInfo(paymentMethodTypeName: String): Result<PaymentMethodTypeInfo>
Link copied to clipboard
fun retrieveSchemaDataFromCache(paymentMethodType: AvailablePaymentMethodType): SchemaPaymentViewModel.SchemaData?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard