diff --git a/src/subscription/BuyOptionBox.ts b/src/subscription/BuyOptionBox.ts index 7e6bdb9e3e52..45299cdb794b 100644 --- a/src/subscription/BuyOptionBox.ts +++ b/src/subscription/BuyOptionBox.ts @@ -7,7 +7,7 @@ import { Icon } from "../gui/base/Icon" import { SegmentControl } from "../gui/base/SegmentControl" import type { BookingItemFeatureType } from "../api/common/TutanotaConstants" import { Keys } from "../api/common/TutanotaConstants" -import { asPaymentInterval, formatMonthlyPrice, formatPrice, getCountFromPriceData, getPriceFromPriceData, PaymentInterval } from "./PriceUtils" +import { asPaymentInterval, formatMonthlyPrice, getCountFromPriceData, getPriceFromPriceData, PaymentInterval } from "./PriceUtils" import type { BookingFacade } from "../api/worker/facades/lazy/BookingFacade.js" import Stream from "mithril/stream" import { Icons } from "../gui/base/icons/Icons" diff --git a/src/subscription/UpgradeConfirmSubscriptionPage.ts b/src/subscription/UpgradeConfirmSubscriptionPage.ts index 6c58c230673e..9b533e254914 100644 --- a/src/subscription/UpgradeConfirmSubscriptionPage.ts +++ b/src/subscription/UpgradeConfirmSubscriptionPage.ts @@ -38,14 +38,10 @@ export class UpgradeConfirmSubscriptionPage implements WizardPageN { - let customerId - if (!locator.logins.isUserLoggedIn()) { await locator.logins.createSession(neverNull(data.newAccountData).mailAddress, neverNull(data.newAccountData).password, SessionType.Temporary) } - customerId = locator.logins.getUserController().user.customer! + const customerId = locator.logins.getUserController().user.customer! const customerIdBytes = base64ToUint8Array(base64ExtToBase64(customerId)) - let result = await showProgressDialog( + const result = await showProgressDialog( "pleaseWait_msg", locator.mobilePaymentsFacade.requestSubscriptionToPlan(PlanTypeToName[data.type].toLowerCase(), data.options.paymentInterval(), customerIdBytes), ) diff --git a/src/subscription/UpgradeSubscriptionPage.ts b/src/subscription/UpgradeSubscriptionPage.ts index 9bab1105632b..1aab24bf12b1 100644 --- a/src/subscription/UpgradeSubscriptionPage.ts +++ b/src/subscription/UpgradeSubscriptionPage.ts @@ -193,7 +193,7 @@ export class UpgradeSubscriptionPage implements WizardPageN() @@ -193,11 +194,12 @@ export async function loadSignupWizard( const wizardPages = [ wizardPageWrapper(UpgradeSubscriptionPage, new UpgradeSubscriptionPageAttrs(signupData)), wizardPageWrapper(SignupPage, new SignupPageAttrs(signupData)), + wizardPageWrapper(InvoiceAndPaymentDataPage, invoiceAttrs), wizardPageWrapper(UpgradeConfirmSubscriptionPage, invoiceAttrs), wizardPageWrapper(UpgradeCongratulationsPage, new UpgradeCongratulationsPageAttrs(signupData)), ] - if (!isIOSApp()) { - wizardPages.splice(2, 0, wizardPageWrapper(InvoiceAndPaymentDataPage, invoiceAttrs)) + if (isIOSApp()) { + wizardPages.splice(2, 1) // do not show this page on AppStore payment since we are only able to show this single payment method on iOS } const wizardBuilder = createWizardDialog(signupData, wizardPages, async () => { if (locator.logins.isUserLoggedIn()) {