Update discount logic

This commit is contained in:
deeppandya
2024-05-08 13:27:55 -04:00
parent 97d49ff6e5
commit 180f7b84df
@@ -544,9 +544,9 @@ public class InAppPurchaseWrapper {
if (yearlyPrice == 0) {
return 0;
}
double percentage = (100 - (yearlyActualPrice * 100) / yearlyPrice);
Log.e("barve_vpn", (int) Math.round(percentage) + "");
return (int) Math.round(percentage);
double discountPrice = yearlyPrice - yearlyActualPrice;
double discountPercentage = (discountPrice / yearlyPrice) * 100;
return (int) Math.round(discountPercentage);
}
return 0;
}