Compare commits
2 Commits
d17c26a228
...
eb83a0392a
Author | SHA1 | Date | |
---|---|---|---|
eb83a0392a
|
|||
85fefcf724
|
@@ -79,15 +79,6 @@ public class SubscriptionService(
|
||||
var couponData = await couponTask;
|
||||
|
||||
// Validation checks
|
||||
if (subscriptionInfo.RequiredLevel > 0)
|
||||
{
|
||||
if (profile is null)
|
||||
throw new InvalidOperationException("Account profile was not found.");
|
||||
if (profile.Level < subscriptionInfo.RequiredLevel)
|
||||
throw new InvalidOperationException(
|
||||
$"Account level must be at least {subscriptionInfo.RequiredLevel} to subscribe to {identifier}."
|
||||
);
|
||||
}
|
||||
|
||||
if (isFreeTrial && prevFreeTrial != null)
|
||||
throw new InvalidOperationException("Free trial already exists.");
|
||||
|
@@ -30,21 +30,21 @@ public record class SubscriptionTypeData(
|
||||
SubscriptionType.StellarProgram,
|
||||
WalletCurrency.SourcePoint,
|
||||
1200,
|
||||
3
|
||||
20
|
||||
),
|
||||
[SubscriptionType.Nova] = new SubscriptionTypeData(
|
||||
SubscriptionType.Nova,
|
||||
SubscriptionType.StellarProgram,
|
||||
WalletCurrency.SourcePoint,
|
||||
2400,
|
||||
6
|
||||
40
|
||||
),
|
||||
[SubscriptionType.Supernova] = new SubscriptionTypeData(
|
||||
SubscriptionType.Supernova,
|
||||
SubscriptionType.StellarProgram,
|
||||
WalletCurrency.SourcePoint,
|
||||
3600,
|
||||
9
|
||||
60
|
||||
)
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user