Send and receive SMS messages using your Android phone programmatically via a simple HTTP API
fix: update wording for billing page
Acho Arnold Ewin35060558bc14
diff --git a/api/go.mod b/api/go.modindex 094bb1ac..8bbb8127 100644--- a/api/go.mod+++ b/api/go.mod@@ -10,7 +10,7 @@ require (github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.57.0github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.33.0github.com/NdoleStudio/go-otelroundtripper v0.0.15- github.com/NdoleStudio/lemonsqueezy-go v1.3.1+ github.com/NdoleStudio/lemonsqueezy-go v1.3.2github.com/NdoleStudio/plunk-go v0.0.2github.com/NdoleStudio/stacktrace v1.1.0github.com/avast/retry-go/v5 v5.0.0diff --git a/api/go.sum b/api/go.sumindex d0272fa1..aea01f86 100644--- a/api/go.sum+++ b/api/go.sum@@ -56,12 +56,10 @@ github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZegithub.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=github.com/NdoleStudio/go-otelroundtripper v0.0.15 h1:lClvnSNRKfdPejUcMaFa3vv9nkIdONJOzO/WSNBVY2w=github.com/NdoleStudio/go-otelroundtripper v0.0.15/go.mod h1:YkRryIMC2i4a/6S86isXH+bht3Qp4RRB0rOnnnHBPjU=-github.com/NdoleStudio/lemonsqueezy-go v1.3.1 h1:lMUVgdAx2onbOUJIVPR05xAANYuCMXBRaGWpAdA4LiM=-github.com/NdoleStudio/lemonsqueezy-go v1.3.1/go.mod h1:xKRsRX1jSI6mLrVXyWh2sF/1isxTioZrSjWy6HpA3xQ=+github.com/NdoleStudio/lemonsqueezy-go v1.3.2 h1:XUNOzpMriXErxRQRW0dQT0OvkNBP6VAyZKlFWypyGrc=+github.com/NdoleStudio/lemonsqueezy-go v1.3.2/go.mod h1:xKRsRX1jSI6mLrVXyWh2sF/1isxTioZrSjWy6HpA3xQ=github.com/NdoleStudio/plunk-go v0.0.2 h1:afPW7MHK4Z3rsybpJBnmTmxKCLKF1M7sPI+BNGPf35A=github.com/NdoleStudio/plunk-go v0.0.2/go.mod h1:pqG3zKhpn/A2bL1K+WsWzvfTpOeSkYgXhNk5H65uEc8=-github.com/NdoleStudio/stacktrace v1.0.0 h1:YIDg0twM2BXRKIFjorX7v2dC0l8z4VEITurI+MNqvVQ=-github.com/NdoleStudio/stacktrace v1.0.0/go.mod h1:WOBcbXShYu+v8JtjFEM+rRV9GJW50m+dwIvp4sLuVTg=github.com/NdoleStudio/stacktrace v1.1.0 h1:Ai0j//4tDo/So3nR8bZgS3pQ4NYmViHlarpIReiyb5k=github.com/NdoleStudio/stacktrace v1.1.0/go.mod h1:WOBcbXShYu+v8JtjFEM+rRV9GJW50m+dwIvp4sLuVTg=github.com/PuerkitoBio/goquery v1.12.0 h1:pAcL4g3WRXekcB9AU/y1mbKez2dbY2AajVhtkO8RIBo=diff --git a/api/pkg/handlers/user_handler.go b/api/pkg/handlers/user_handler.goindex b5f224fd..673879b7 100644--- a/api/pkg/handlers/user_handler.go+++ b/api/pkg/handlers/user_handler.go@@ -196,7 +196,7 @@ func (h *UserHandler) subscriptionUpdateURL(c fiber.Ctx) error {url, err := h.service.GetSubscriptionUpdateURL(ctx, authUser.ID)if err != nil {- ctxLogger.Error(stacktrace.Propagatef(err, "cannot get user with ID [%s]", authUser.ID))+ ctxLogger.Error(stacktrace.Propagatef(err, "cannot get subscription update URL for user with ID [%s]", authUser.ID))return h.responseInternalServerError(c)}diff --git a/api/pkg/services/user_service.go b/api/pkg/services/user_service.goindex 131b72d1..eaadc5e2 100644--- a/api/pkg/services/user_service.go+++ b/api/pkg/services/user_service.go@@ -10,9 +10,8 @@ import ("firebase.google.com/go/auth""github.com/NdoleStudio/httpsms/pkg/emails""github.com/NdoleStudio/httpsms/pkg/events"- "github.com/NdoleStudio/lemonsqueezy-go"-"github.com/NdoleStudio/httpsms/pkg/repositories"+ "github.com/NdoleStudio/lemonsqueezy-go""github.com/NdoleStudio/stacktrace""github.com/google/uuid"@@ -406,7 +405,7 @@ func (service *UserService) InitiateSubscriptionCancel(ctx context.Context, userreturn nil}-// GetSubscriptionUpdateURL initiates the cancelling of a subscription on lemonsqueezy+// GetSubscriptionUpdateURL fetches the LemonSqueezy page for updating a subscription.func (service *UserService) GetSubscriptionUpdateURL(ctx context.Context, userID entities.UserID) (url string, err error) {ctx, span := service.tracer.Start(ctx)defer span.End()diff --git a/web/app/pages/billing/index.vue b/web/app/pages/billing/index.vueindex d06736e0..55e90f70 100644--- a/web/app/pages/billing/index.vue+++ b/web/app/pages/billing/index.vue@@ -1,12 +1,12 @@<script setup lang="ts">import {+ mdiAlert,mdiArrowLeft,- mdiCallReceived,mdiCallMade,+ mdiCallReceived,mdiCheck,- mdiAlert,- mdiInvoice,mdiDownloadOutline,+ mdiInvoice,} from '@mdi/js'import type {RequestsUserPaymentInvoice,@@ -188,9 +188,12 @@ async function loadSubscriptionInvoices() {async function updateDetails() {loading.value = truetry {- const link = await billingStore.getSubscriptionUpdateLink()- window.location.href = link+ window.location.href = await billingStore.getSubscriptionUpdateLink()} catch {+ notificationsStore.addNotification({+ message: 'We could not redirect you to the subscription update portal.',+ type: 'error',+ })loading.value = false}}@@ -205,6 +208,10 @@ async function cancelPlan() {})navigateTo('/')} catch {+ notificationsStore.addNotification({+ message: 'We could not cancel your subscription.',+ type: 'error',+ })loading.value = false}}@@ -358,10 +365,10 @@ onMounted(async () => {</template><VCard><VCardText class="pt-4">- <h2 class="text-headline-medium mb-2">+ <h2 class="text-headline-medium mt-0 mb-2">Are you sure you want to cancel your subscription?</h2>- <p>+ <p class="text-medium-emphasis">You will be downgraded to the free plan at the endof the current billing period on<b>{{@@ -371,8 +378,12 @@ onMounted(async () => {}}</b></p></VCardText>- <VCardActions>- <VBtn color="primary" @click="dialog = false">+ <VCardActions class="mt-n6 px-6 pb-6">+ <VBtn+ color="primary"+ variant="flat"+ @click="dialog = false"+ >Keep Subscription</VBtn><VSpacer />@@ -408,10 +419,10 @@ onMounted(async () => {Pro Plan</h1><p class="text-medium-emphasis">- Send and receive up to 20,000 messages per month+ Send and receive 5,000 to 20,000 messages per month</p></VCol>- <VCol class="flex-grow-0 flex-shrink-0">+ <VCol class="flex-grow-0 flex-shrink-0 text-center"><span class="text-headline-medium">$10</span>/month</VCol></VRow>@@ -429,10 +440,11 @@ onMounted(async () => {Enterprise Plan</h1><p class="text-medium-emphasis">- Send and receive up to 200,000 messages per month+ Send and receive 50,000 to 200,000 messages per+ month</p></VCol>- <VCol class="flex-grow-0 flex-shrink-0">+ <VCol class="flex-grow-0 flex-shrink-0 text-center"><span class="text-headline-medium">$89</span>/month</VCol></VRow>