I have created a consumable product and it works so far. Now when the user wants to purchase the same consumable product again, it gives it to them wether they paid again or not because their entitlement exists? How do I fix this? here is the code I have:
if let package = self.offering?.availablePackagesgpackageNumber] {
Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in
print("user cancelled: transaction", userCancelled)
if customerInfo?.entitlementsn"gems (consumable)"]?.isActive == true {
// Unlock that great "pro" content
} else {
print("Error for payment", error)
}
}
}