initiateNewPurchase

fun initiateNewPurchase(activity: Activity, zsPlan: ZSPlan, offerId: String = "", zsCustomFields: ArrayList<ZSCustomField> = ArrayList(), purchasesUpdatedListener: PurchaseUpdationListener)

Will subscribe to the particular plan ZSPlan. The subscription will be activated in Play Store and a corresponding subscription will also be created in Zoho Billing.

Parameters

activity

The current activity from which the purchase is initiated.

zsPlan

The plan object ZSPlan to which the user wants to subscribe.

offerId

The offer id which has to be applied to the plan while subscribing. If no offer is to be applied, pass an empty string. Pass offer Id if the offer is developer determined.

zsCustomFields

An optional array of custom fields ZSCustomField to be sent along with the subscription data to Zoho Billing.

purchasesUpdatedListener

An interface which handles the success or failure result of the purchase flow.