Compare commits
2 Commits
d17c26a228
...
eb83a0392a
Author | SHA1 | Date | |
---|---|---|---|
eb83a0392a
|
|||
85fefcf724
|
@@ -79,15 +79,6 @@ public class SubscriptionService(
|
|||||||
var couponData = await couponTask;
|
var couponData = await couponTask;
|
||||||
|
|
||||||
// Validation checks
|
// 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)
|
if (isFreeTrial && prevFreeTrial != null)
|
||||||
throw new InvalidOperationException("Free trial already exists.");
|
throw new InvalidOperationException("Free trial already exists.");
|
||||||
|
@@ -30,21 +30,21 @@ public record class SubscriptionTypeData(
|
|||||||
SubscriptionType.StellarProgram,
|
SubscriptionType.StellarProgram,
|
||||||
WalletCurrency.SourcePoint,
|
WalletCurrency.SourcePoint,
|
||||||
1200,
|
1200,
|
||||||
3
|
20
|
||||||
),
|
),
|
||||||
[SubscriptionType.Nova] = new SubscriptionTypeData(
|
[SubscriptionType.Nova] = new SubscriptionTypeData(
|
||||||
SubscriptionType.Nova,
|
SubscriptionType.Nova,
|
||||||
SubscriptionType.StellarProgram,
|
SubscriptionType.StellarProgram,
|
||||||
WalletCurrency.SourcePoint,
|
WalletCurrency.SourcePoint,
|
||||||
2400,
|
2400,
|
||||||
6
|
40
|
||||||
),
|
),
|
||||||
[SubscriptionType.Supernova] = new SubscriptionTypeData(
|
[SubscriptionType.Supernova] = new SubscriptionTypeData(
|
||||||
SubscriptionType.Supernova,
|
SubscriptionType.Supernova,
|
||||||
SubscriptionType.StellarProgram,
|
SubscriptionType.StellarProgram,
|
||||||
WalletCurrency.SourcePoint,
|
WalletCurrency.SourcePoint,
|
||||||
3600,
|
3600,
|
||||||
9
|
60
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user