I can see in docs how to make Purchases with Kotlin like this:
Purchases.sharedInstance.purchaseWith(
PurchaseParams.Builder(this, aPackage).build(),
onError = { error, userCancelled -> /* No purchase */ },
onSuccess = { storeTransaction, customerInfo ->
if (customerInfo.entitlements["my_entitlement_identifier"]?.isActive == true) {
// Unlock that great "pro" content
}
}
)
But how can I can the attribute of (aPackage) on line.2? Please answer with code if possible.
N.B: I have a 1 monthly subscription and I need to make when click on a button it directly opens Google default Paywall to make the purchase. So any other way to achieve this threw RevenueCat is appreciated.