purchaseProductWith
fun Purchases.purchaseProductWith(activity: Activity, skuDetails: SkuDetails, onError: PurchaseErrorFunction = ON_PURCHASE_ERROR_STUB, onSuccess: PurchaseCompletedFunction)
Content copied to clipboard
Purchase product.
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.purchaseProductWith(activity: Activity, skuDetails: SkuDetails, upgradeInfo: UpgradeInfo, onError: PurchaseErrorFunction = ON_PURCHASE_ERROR_STUB, onSuccess: ProductChangeCompletedFunction)
Content copied to clipboard
Make a purchase.
Parameters
activity
Current activity
skuDetails
The skuDetails of the product 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