Send and receive SMS messages using your Android phone programmatically via a simple HTTP API
Update plan
Acho Arnolde133354ec484
diff --git a/api/pkg/entities/user.go b/api/pkg/entities/user.goindex 2e8a53c7..a51959b4 100644--- a/api/pkg/entities/user.go+++ b/api/pkg/entities/user.go@@ -17,7 +17,10 @@ func (subscription SubscriptionName) Limit() uint {if subscription == SubscriptionNameFree {return 200}- return 5000+ if subscription == SubscriptionNameProMonthly || subscription == SubscriptionNameProYearly || subscription == SubscriptionNameProLifetime {+ return 5000+ }+ return 10000}// SubscriptionNameFree represents a free subscription@@ -29,6 +32,12 @@ const SubscriptionNameProMonthly = SubscriptionName("pro-monthly")// SubscriptionNameProYearly represents a yearly pro subscriptionconst SubscriptionNameProYearly = SubscriptionName("pro-yearly")+// SubscriptionNameUltraMonthly represents a monthly ultra subscription+const SubscriptionNameUltraMonthly = SubscriptionName("ultra-monthly")++// SubscriptionNameUltraYearly represents a yearly ultra subscription+const SubscriptionNameUltraYearly = SubscriptionName("ultra-yearly")+// SubscriptionNameProLifetime represents a pro lifetime subscriptionconst SubscriptionNameProLifetime = SubscriptionName("pro-lifetime")@@ -52,3 +61,8 @@ type User struct {func (user User) IsOnProPlan() bool {return user.SubscriptionName == SubscriptionNameProLifetime || user.SubscriptionName == SubscriptionNameProMonthly || user.SubscriptionName == SubscriptionNameProYearly}++// IsOnUltraPlan checks if a user is on the ultra plan+func (user User) IsOnUltraPlan() bool {+ return user.SubscriptionName == SubscriptionNameUltraMonthly || user.SubscriptionName == SubscriptionNameUltraYearly+}diff --git a/api/pkg/services/billing_service.go b/api/pkg/services/billing_service.goindex 42499463..d35c112e 100644--- a/api/pkg/services/billing_service.go+++ b/api/pkg/services/billing_service.go@@ -209,5 +209,10 @@ func (service *BillingService) shouldSendAlert(user *entities.User, usage *entitif user.IsOnProPlan() && (usage.TotalMessages() == 4000 || usage.TotalMessages() == 4500 || usage.TotalMessages() == 4750) {return true}++ if user.IsOnUltraPlan() && (usage.TotalMessages() == 8000 || usage.TotalMessages() == 9000 || usage.TotalMessages() == 9500) {+ return true+ }+return false}diff --git a/api/pkg/services/lemonsqueezy_service.go b/api/pkg/services/lemonsqueezy_service.goindex b9f02c3f..bf3970f4 100644--- a/api/pkg/services/lemonsqueezy_service.go+++ b/api/pkg/services/lemonsqueezy_service.go@@ -101,8 +101,17 @@ func (service *LemonsqueezyService) HandleSubscriptionCanceledEvent(ctx context.}func (service *LemonsqueezyService) subscriptionName(variant string) entities.SubscriptionName {- if strings.Contains(strings.ToLower(variant), "monthly") {- return entities.SubscriptionNameProMonthly+ if strings.Contains(strings.ToLower(variant), "pro") {+ if strings.Contains(strings.ToLower(variant), "monthly") {+ return entities.SubscriptionNameProMonthly+ }+ return entities.SubscriptionNameProYearly}- return entities.SubscriptionNameProYearly+ if strings.Contains(strings.ToLower(variant), "ultra") {+ if strings.Contains(strings.ToLower(variant), "monthly") {+ return entities.SubscriptionNameUltraMonthly+ }+ return entities.SubscriptionNameUltraYearly+ }+ return entities.SubscriptionNameFree}diff --git a/web/.env.production b/web/.env.productionindex 8c05d115..1a7afe29 100644--- a/web/.env.production+++ b/web/.env.production@@ -7,4 +7,4 @@ APP_DOCUMENTATION_URL=https://docs.httpsms.comAPP_DOWNLOAD_URL=https://github.com/NdoleStudio/httpsms/releases/latest/download/HttpSms.apkAPP_ENV=production-CHECKOUT_URL=https://httpsms.lemonsqueezy.com/checkout/buy/277d9687-836f-4bfb-8065-8bbc9b9ca674+CHECKOUT_URL=https://httpsms.lemonsqueezy.com/checkout/buy/706c5638-4c8d-40db-a6f2-b6371b7e0af4diff --git a/web/pages/billing/index.vue b/web/pages/billing/index.vueindex 819bb0ed..810fd21b 100644--- a/web/pages/billing/index.vue+++ b/web/pages/billing/index.vue@@ -160,10 +160,10 @@>Pro - Monthly</h1>- <p class="text--secondary">5,000 messages</p>+ <p class="text--secondary">5,000 messages monthly</p></v-col><v-col class="shrink">- <span class="text-h5 text--primary">$6</span>/month+ <span class="text-h5 text--primary">$10</span>/month</v-col></v-row></v-card-text>@@ -185,13 +185,13 @@>Pro - Yearly<v-chip small color="primary" class="mt-n1"- >Save 20%</v-chip+ >2 months free</v-chip></h1>- <p class="text--secondary">5,000 messages</p>+ <p class="text--secondary">5,000 messages monthly</p></v-col><v-col class="shrink">- <span class="text-h5 text--primary">$5</span>/month+ <span class="text-h5 text--primary">$100</span>/year</v-col></v-row></v-card-text>@@ -365,13 +365,25 @@ export default Vue.extend({name: 'PRO - Monthly',id: 'pro-monthly',messagesPerMonth: 5000,- price: 6,+ price: 10,},{name: 'PRO - Yearly',id: 'pro-yearly',messagesPerMonth: 5000,- price: 60,+ price: 100,+ },+ {+ name: 'Ultra - Monthly',+ id: 'ultra-monthly',+ messagesPerMonth: 5000,+ price: 20,+ },+ {+ name: 'Ultra - Yearly',+ id: 'ultra-yearly',+ messagesPerMonth: 5000,+ price: 200,},{name: 'PRO - Lifetime',diff --git a/web/pages/index.vue b/web/pages/index.vueindex 99d34925..e405661a 100644--- a/web/pages/index.vue+++ b/web/pages/index.vue@@ -468,13 +468,19 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());<p class="text-h6 mr-3 mt-3">Monthly</p><v-switch v-model="yearlyPricing"></v-switch><p class="text-h6 ml-3 mt-3">- Yearly <v-chip color="primary" small>save 20%</v-chip>+ Yearly+ <v-chip color="primary" small>+ <v-avatar left>+ <v-icon small>{{ mdiGift }}</v-icon>+ </v-avatar>+ 2 months free</v-chip+ ></p></div></v-col></v-row><v-row>- <v-col cols="12" lg="4" offset-lg="2">+ <v-col cols="12" lg="4"><v-card elevation="4" color="#121212"><v-card-text><h1 class="text-center text-h3 text--primary">Free</h1>@@ -524,15 +530,17 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());features.</p><p v-if="!yearlyPricing" class="text-center text--primary">- <span class="text-h3">$6</span>/month+ <span class="text-h3">$10</span>/month</p><p v-else class="text-center text--primary">- <span class="text-h3">$60</span>/year+ <span class="text-h3">$100</span>/year</p><p v-if="!yearlyPricing" class="text-center mt-n3">- or <b>$72</b> per year+ or <b>$100</b> per year+ </p>+ <p v-else class="text-center mt-n3">+ or <b>$8.33</b> per month</p>- <p v-else class="text-center mt-n3">or <b>$5</b> per month</p><v-btn block color="primary" :to="{ name: 'login' }" large>Try For Free</v-btn>@@ -562,6 +570,54 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());</v-card-text></v-card></v-col>+ <v-col cols="12" lg="4">+ <v-card elevation="4" color="#121212">+ <v-card-text>+ <h1 class="text-center text-h3 text--primary">Ultra</h1>+ <p class="subtitle-1 text-center">+ Send and receive up to 10,000 SMS messages like a power user.+ </p>+ <p v-if="!yearlyPricing" class="text-center text--primary">+ <span class="text-h3">$20</span>/month+ </p>+ <p v-else class="text-center text--primary">+ <span class="text-h3">$200</span>/year+ </p>+ <p v-if="!yearlyPricing" class="text-center mt-n3">+ or <b>$200</b> per year+ </p>+ <p v-else class="text-center mt-n3">+ or <b>$16.66</b> per month+ </p>+ <v-btn block color="default" :to="{ name: 'login' }" large+ >Try For Free</v-btn+ >+ <p class="mt-8 subtitle-1">+ <v-icon color="primary" class="mt-n1" left>{{+ mdiCheckCircle+ }}</v-icon+ >Send or receive up to <b>10,000</b> SMS/month+ </p>+ <p class="subtitle-1 mt-n4">+ <v-icon color="primary" class="mt-n1" left>+ {{ mdiCheckCircle }} </v-icon+ >Offline notifications for your phone+ </p>+ <p class="subtitle-1 mt-n4">+ <v-icon color="primary" class="mt-n1" left>{{+ mdiCheckCircle+ }}</v-icon+ >Forward received messages to your server+ </p>+ <p class="subtitle-1 mt-n4">+ <v-icon color="primary" class="mt-n1" left>{{+ mdiCheckCircle+ }}</v-icon+ >Priority email support+ </p>+ </v-card-text>+ </v-card>+ </v-col></v-row></v-container></v-sheet>@@ -574,6 +630,7 @@ import {mdiGithub,mdiCheckCircle,mdiSend,+ mdiGift,mdiForum,mdiNumeric1,mdiLanguagePython,@@ -598,6 +655,7 @@ export default Vue.extend({mdiGithub,mdiCheckCircle,mdiSend,+ mdiGift,mdiForum,mdiNumeric1,mdiNumeric2,