purchases / com.revenuecat.purchases / makePurchaseWith

makePurchaseWith

fun Purchases.makePurchaseWith(activity: Activity, sku: String, skuType: String, oldSkus: ArrayList<String>, onError: MakePurchaseErrorFunction = onMakePurchaseErrorStub, onSuccess: MakePurchaseCompletedSuccessFunction): Unit
Deprecated: Replace with makePurchaseWith accepting SkuDetails and a single oldSku

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, skuDetails: SkuDetails, oldSku: String, onError: MakePurchaseErrorFunction = onMakePurchaseErrorStub, onSuccess: MakePurchaseCompletedSuccessFunction): Unit
fun Purchases.makePurchaseWith(activity: Activity, skuDetails: SkuDetails, onError: MakePurchaseErrorFunction = onMakePurchaseErrorStub, onSuccess: MakePurchaseCompletedSuccessFunction): Unit

Make a purchase.

Parameters

activity - Current activity

skuDetails - The skuDetails of the product you wish to purchase

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: MakePurchaseErrorFunction = onMakePurchaseErrorStub, onSuccess: MakePurchaseCompletedSuccessFunction): Unit
Deprecated: Replace with makePurchaseWith accepting SkuDetails object

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