diff --git a/src/lib/components/billing/alerts/paymentMandate.svelte b/src/lib/components/billing/alerts/paymentMandate.svelte index 8a7c7356a..fa7f75a85 100644 --- a/src/lib/components/billing/alerts/paymentMandate.svelte +++ b/src/lib/components/billing/alerts/paymentMandate.svelte @@ -16,7 +16,7 @@ } -{#if $paymentMissingMandate && $paymentMissingMandate.country === 'in' && $paymentMissingMandate.mandateId === null && !hideBillingHeaderRoutes.includes($page.url.pathname)} +{#if $paymentMissingMandate && $paymentMissingMandate?.country?.toLowerCase() === 'in' && $paymentMissingMandate.mandateId === null && !hideBillingHeaderRoutes.includes($page.url.pathname)} The payment method for {$organization.name} needs to be verified. diff --git a/src/lib/components/billing/selectPaymentMethod.svelte b/src/lib/components/billing/selectPaymentMethod.svelte index bd3963b09..937d6bc67 100644 --- a/src/lib/components/billing/selectPaymentMethod.svelte +++ b/src/lib/components/billing/selectPaymentMethod.svelte @@ -44,7 +44,7 @@ {#if filteredMethods?.length} - {#if selectedPaymentMethod?.country === 'in'} + {#if selectedPaymentMethod?.country?.toLowerCase() === 'in'} Indian credit or debit card-holders To comply with RBI regulations in India, Appwrite will ask for verification to charge up diff --git a/src/lib/stores/billing.ts b/src/lib/stores/billing.ts index 8eda8a6f8..360be380f 100644 --- a/src/lib/stores/billing.ts +++ b/src/lib/stores/billing.ts @@ -362,7 +362,7 @@ export async function checkForMandate(org: Organization) { const paymentId = org.paymentMethodId ?? org.backupPaymentMethodId; if (!paymentId) return; const paymentMethod = await sdk.forConsole.billing.getPaymentMethod(paymentId); - if (paymentMethod.mandateId === null && paymentMethod.country === 'in') { + if (paymentMethod?.mandateId === null && paymentMethod?.country.toLowerCase() === 'in') { headerAlert.add({ id: 'paymentMandate', component: PaymentMandate, diff --git a/src/routes/(console)/organization-[organization]/billing/paymentHistory.svelte b/src/routes/(console)/organization-[organization]/billing/paymentHistory.svelte index ab4c9ec23..d8594d2ba 100644 --- a/src/routes/(console)/organization-[organization]/billing/paymentHistory.svelte +++ b/src/routes/(console)/organization-[organization]/billing/paymentHistory.svelte @@ -125,7 +125,7 @@ {/if} - {formatCurrency(invoice.amount)} + {formatCurrency(invoice.grossAmount)}

- Your payment of ${invoice.amount} due on {toLocaleDate( - invoice.dueAt - )} has failed. Retry your payment to avoid service interruptions with your projects. + Your payment of ${formatCurrency(invoice.grossAmount)} due + on {toLocaleDate(invoice.dueAt)} has failed. Retry your payment to avoid service interruptions + with your projects.