purchases / com.revenuecat.purchases / makePurchaseWith

makePurchaseWith

fun Purchases.makePurchaseWith(activity: Activity, sku: String, skuType: String, oldSkus: ArrayList<String>, onError: ErrorFunction = onErrorStub, onSuccess: PurchaseCompletedSuccessFunction): Unit

Make a purchase.

Parameters

activity - Current activity

sku - The sku you wish to purchase

skuType - The type of sku, INAPP or SUBS

oldSkus - The skus you wish to upgrade from.

onSuccess - Will be called after the purchase has completed

onError - Will be called after the purchase has completed with error

fun Purchases.makePurchaseWith(activity: Activity, sku: String, skuType: String, onError: ErrorFunction = onErrorStub, onSuccess: PurchaseCompletedSuccessFunction): Unit

Make a purchase.

Parameters

activity - Current activity

sku - The sku you wish to purchase

skuType - The type of sku, INAPP or SUBS

onSuccess - Will be called after the purchase has completed

onError - Will be called after the purchase has completed with error