purchaseProductWith

fun Purchases.purchaseProductWith(activity: Activity, storeProduct: <Error class: unknown class>, onError: (<Error class: unknown class>, userCancelled: Boolean) -> Unit = ON_PURCHASE_ERROR_STUB, onSuccess: (<Error class: unknown class>, <Error class: unknown class>) -> Unit)

Deprecated

Use purchase() and PurchaseParams.Builder instead

Replace with

purchase()

Purchase product. If purchasing a subscription, it will choose the default SubscriptionOption.

Parameters

activity

Current activity

storeProduct

The storeProduct of the product you wish to purchase

onSuccess

Will be called after the purchase has completed

onError

Will be called if there was an error with the purchase