vnpayment / com.venuenext.vnpayment.data / PaymentMethodRepository

PaymentMethodRepository

class PaymentMethodRepository : BaseCoroutineScope

Constructors

<init>

PaymentMethodRepository(context: Context)

Properties

context

val context: Context

Functions

getPaymentMethod

Retrieves a user's primary payment method from a cache, database, or network.

suspend fun getPaymentMethod(userId: String? = null, forceRefresh: Boolean = false): PaymentMethod?

getPaymentMethodLiveData

fun getPaymentMethodLiveData(): LiveData<PaymentMethod>

removePaymentMethod

fun removePaymentMethod(userId: String): Unit

storeCreditCardPaymentMethod

suspend fun storeCreditCardPaymentMethod(paymentResult: PaymentResult): Any?