package com.adealink.weparty.wallet.pay

import android.app.Activity
import android.content.Intent
import com.adealink.frame.base.Rlt
import com.adealink.weparty.module.wallet.data.PurchaseInfo
import com.adealink.weparty.module.wallet.data.SkuInfo
import com.adealink.weparty.wallet.pay.model.PurchaseResult

interface IPay {
    suspend fun setup(): Rlt<Any>
    suspend fun querySkuDetails(skuIdList: List<String>): Rlt<List<SkuInfo>>
    suspend fun consume(token: String): Rlt<Any?>
    suspend fun launchPaymentFlow(activity: Activity, skuInfo: SkuInfo, orderId: String): PurchaseResult
    suspend fun queryPurchases(): Rlt<PurchaseInfo>
    fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {}
}