purchasePackageWith

fun Purchases.purchasePackageWith(activity: Activity, packageToPurchase: Package, upgradeInfo: UpgradeInfo, onError: PurchaseErrorFunction = ON_PURCHASE_ERROR_STUB, onSuccess: ProductChangeCompletedFunction)

Make a purchase.

Parameters

activity

Current activity

packageToPurchase

The Package you wish to purchase

upgradeInfo

The upgradeInfo you wish to upgrade from, containing the oldSku and the optional prorationMode.

onSuccess

Will be called after the purchase has completed

onError

Will be called after the purchase has completed with error


fun Purchases.purchasePackageWith(activity: Activity, packageToPurchase: Package, onError: PurchaseErrorFunction = ON_PURCHASE_ERROR_STUB, onSuccess: PurchaseCompletedFunction)

Make a purchase.

Parameters

activity

Current activity

packageToPurchase

The Package you wish to purchase

onSuccess

Will be called after the purchase has completed

onError

Will be called after the purchase has completed with error