diff --git a/apps/web/src/app/billing/individual/user-subscription.component.ts b/apps/web/src/app/billing/individual/user-subscription.component.ts index 156205e056..1918d71fa4 100644 --- a/apps/web/src/app/billing/individual/user-subscription.component.ts +++ b/apps/web/src/app/billing/individual/user-subscription.component.ts @@ -69,18 +69,6 @@ export class UserSubscriptionComponent implements OnInit { return; } - if (this.usingInAppPurchase) { - this.dialogService.openSimpleDialog({ - title: { key: "cancelSubscription" }, - content: { key: "manageSubscriptionFromStore" }, - acceptButtonText: { key: "ok" }, - cancelButtonText: null, - type: "warning", - }); - - return; - } - const confirmed = await this.dialogService.openSimpleDialog({ title: { key: "reinstateSubscription" }, content: { key: "reinstateConfirmation" }, @@ -106,18 +94,6 @@ export class UserSubscriptionComponent implements OnInit { return; } - if (this.usingInAppPurchase) { - this.dialogService.openSimpleDialog({ - title: { key: "cancelSubscription" }, - content: { key: "manageSubscriptionFromStore" }, - acceptButtonText: { key: "ok" }, - cancelButtonText: null, - type: "warning", - }); - - return; - } - const confirmed = await this.dialogService.openSimpleDialog({ title: { key: "cancelSubscription" }, content: { key: "cancelConfirmation" }, @@ -169,17 +145,6 @@ export class UserSubscriptionComponent implements OnInit { } adjustStorage(add: boolean) { - if (this.usingInAppPurchase) { - this.dialogService.openSimpleDialog({ - title: { key: add ? "addStorage" : "removeStorage" }, - content: { key: "cannotPerformInAppPurchase" }, - acceptButtonText: { key: "ok" }, - cancelButtonText: null, - type: "warning", - }); - - return; - } this.adjustStorageAdd = add; this.showAdjustStorage = true; } @@ -215,10 +180,6 @@ export class UserSubscriptionComponent implements OnInit { return this.storagePercentage < 5 ? 5 : 0; } - get usingInAppPurchase() { - return this.sub != null ? this.sub.usingInAppPurchase : false; - } - get title(): string { return this.i18nService.t(this.selfHosted ? "subscription" : "premiumMembership"); } diff --git a/apps/web/src/app/billing/shared/payment-method.component.html b/apps/web/src/app/billing/shared/payment-method.component.html index 75380352bc..112f343aab 100644 --- a/apps/web/src/app/billing/shared/payment-method.component.html +++ b/apps/web/src/app/billing/shared/payment-method.component.html @@ -91,7 +91,6 @@

- {{ "inAppPurchase" | i18n }} {{ paymentSource.description }}

diff --git a/apps/web/src/app/billing/shared/payment-method.component.ts b/apps/web/src/app/billing/shared/payment-method.component.ts index 8a8eef3ac3..7917357835 100644 --- a/apps/web/src/app/billing/shared/payment-method.component.ts +++ b/apps/web/src/app/billing/shared/payment-method.component.ts @@ -106,17 +106,6 @@ export class PaymentMethodComponent implements OnInit { } addCredit() { - if (this.paymentSourceInApp) { - this.dialogService.openSimpleDialog({ - title: { key: "addCredit" }, - content: { key: "cannotPerformInAppPurchase" }, - acceptButtonText: { key: "ok" }, - cancelButtonText: null, - type: "warning", - }); - - return; - } this.showAddCredit = true; } @@ -128,18 +117,6 @@ export class PaymentMethodComponent implements OnInit { } changePayment() { - if (this.paymentSourceInApp) { - this.dialogService.openSimpleDialog({ - title: { key: "changePaymentMethod" }, - content: { key: "cannotPerformInAppPurchase" }, - acceptButtonText: { key: "ok" }, - cancelButtonText: null, - type: "warning", - }); - - return; - } - this.showAdjustPayment = true; } @@ -209,10 +186,6 @@ export class PaymentMethodComponent implements OnInit { return ["bwi-bank"]; case PaymentMethodType.Check: return ["bwi-money"]; - case PaymentMethodType.AppleInApp: - return ["bwi-apple text-muted"]; - case PaymentMethodType.GoogleInApp: - return ["bwi-google text-muted"]; case PaymentMethodType.PayPal: return ["bwi-paypal text-primary"]; default: @@ -220,14 +193,6 @@ export class PaymentMethodComponent implements OnInit { } } - get paymentSourceInApp() { - return ( - this.paymentSource != null && - (this.paymentSource.type === PaymentMethodType.AppleInApp || - this.paymentSource.type === PaymentMethodType.GoogleInApp) - ); - } - get subscription() { return this.sub?.subscription ?? this.org?.subscription ?? null; } diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 982c9498c0..dbf317443f 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -3828,15 +3828,6 @@ "couldNotChargeCardPayInvoice": { "message": "We were not able to charge your card. Please view and pay the unpaid invoice listed below." }, - "inAppPurchase": { - "message": "In-app purchase" - }, - "cannotPerformInAppPurchase": { - "message": "You cannot perform this action while using an in-app purchase payment method." - }, - "manageSubscriptionFromStore": { - "message": "You must manage your subscription from the store where your in-app purchase was made." - }, "minLength": { "message": "Minimum length" }, diff --git a/libs/common/src/abstractions/api.service.ts b/libs/common/src/abstractions/api.service.ts index 42cab8c21b..060e87759c 100644 --- a/libs/common/src/abstractions/api.service.ts +++ b/libs/common/src/abstractions/api.service.ts @@ -90,7 +90,6 @@ import { TaxInfoResponse } from "../billing/models/response/tax-info.response"; import { TaxRateResponse } from "../billing/models/response/tax-rate.response"; import { DeleteRecoverRequest } from "../models/request/delete-recover.request"; import { EventRequest } from "../models/request/event.request"; -import { IapCheckRequest } from "../models/request/iap-check.request"; import { KdfRequest } from "../models/request/kdf.request"; import { KeysRequest } from "../models/request/keys.request"; import { OrganizationImportRequest } from "../models/request/organization-import.request"; @@ -169,7 +168,6 @@ export abstract class ApiService { postPasswordHint: (request: PasswordHintRequest) => Promise; postRegister: (request: RegisterRequest) => Promise; postPremium: (data: FormData) => Promise; - postIapCheck: (request: IapCheckRequest) => Promise; postReinstatePremium: () => Promise; postCancelPremium: () => Promise; postAccountStorage: (request: StorageRequest) => Promise; diff --git a/libs/common/src/billing/enums/payment-method-type.enum.ts b/libs/common/src/billing/enums/payment-method-type.enum.ts index 701bd886ac..9b29263175 100644 --- a/libs/common/src/billing/enums/payment-method-type.enum.ts +++ b/libs/common/src/billing/enums/payment-method-type.enum.ts @@ -5,7 +5,5 @@ export enum PaymentMethodType { BitPay = 3, Credit = 4, WireTransfer = 5, - AppleInApp = 6, - GoogleInApp = 7, Check = 8, } diff --git a/libs/common/src/billing/models/response/subscription.response.ts b/libs/common/src/billing/models/response/subscription.response.ts index d6bff87adb..b5286ead42 100644 --- a/libs/common/src/billing/models/response/subscription.response.ts +++ b/libs/common/src/billing/models/response/subscription.response.ts @@ -8,7 +8,6 @@ export class SubscriptionResponse extends BaseResponse { upcomingInvoice: BillingSubscriptionUpcomingInvoiceResponse; license: any; expiration: string; - usingInAppPurchase: boolean; constructor(response: any) { super(response); @@ -17,7 +16,6 @@ export class SubscriptionResponse extends BaseResponse { this.maxStorageGb = this.getResponseProperty("MaxStorageGb"); this.license = this.getResponseProperty("License"); this.expiration = this.getResponseProperty("Expiration"); - this.usingInAppPurchase = this.getResponseProperty("UsingInAppPurchase"); const subscription = this.getResponseProperty("Subscription"); const upcomingInvoice = this.getResponseProperty("UpcomingInvoice"); this.subscription = subscription == null ? null : new BillingSubscriptionResponse(subscription); diff --git a/libs/common/src/models/request/iap-check.request.ts b/libs/common/src/models/request/iap-check.request.ts deleted file mode 100644 index ef536af04c..0000000000 --- a/libs/common/src/models/request/iap-check.request.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { PaymentMethodType } from "../../billing/enums"; - -export class IapCheckRequest { - paymentMethodType: PaymentMethodType; -} diff --git a/libs/common/src/services/api.service.ts b/libs/common/src/services/api.service.ts index 5515579851..d9ccf87a51 100644 --- a/libs/common/src/services/api.service.ts +++ b/libs/common/src/services/api.service.ts @@ -96,7 +96,6 @@ import { DeviceType } from "../enums"; import { CollectionBulkDeleteRequest } from "../models/request/collection-bulk-delete.request"; import { DeleteRecoverRequest } from "../models/request/delete-recover.request"; import { EventRequest } from "../models/request/event.request"; -import { IapCheckRequest } from "../models/request/iap-check.request"; import { KdfRequest } from "../models/request/kdf.request"; import { KeysRequest } from "../models/request/keys.request"; import { OrganizationImportRequest } from "../models/request/organization-import.request"; @@ -382,10 +381,6 @@ export class ApiService implements ApiServiceAbstraction { return new PaymentResponse(r); } - async postIapCheck(request: IapCheckRequest): Promise { - return this.send("POST", "/accounts/iap-check", request, true, false); - } - postReinstatePremium(): Promise { return this.send("POST", "/accounts/reinstate-premium", null, true, false); }