Merge pull request #26087 from overleaf/mf-change-to-stripe-uk

[web] Configure to use Stripe UK account

GitOrigin-RevId: 0856f6da2caae8caf9887ec2acea8e7f0972e598
This commit is contained in:
Kristina
2025-06-09 08:05:09 +00:00
committed by Copybot
parent 9e9ad3c005
commit a8df91e91b
9 changed files with 60 additions and 49 deletions
@@ -55,63 +55,63 @@ describe('PlansLocator', function () {
const planCode = 'collaborator'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('standard_monthly')
expect(lookupKey).to.equal('collaborator_may2025')
})
it('should map "collaborator_free_trial_7_days" plan code to stripe lookup keys', function () {
const planCode = 'collaborator_free_trial_7_days'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('standard_monthly')
expect(lookupKey).to.equal('collaborator_may2025')
})
it('should map "collaborator-annual" plan code to stripe lookup keys', function () {
const planCode = 'collaborator-annual'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('standard_annual')
expect(lookupKey).to.equal('collaborator_annual_may2025')
})
it('should map "professional" plan code to stripe lookup keys', function () {
const planCode = 'professional'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('professional_monthly')
expect(lookupKey).to.equal('professional_may2025')
})
it('should map "professional_free_trial_7_days" plan code to stripe lookup keys', function () {
const planCode = 'professional_free_trial_7_days'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('professional_monthly')
expect(lookupKey).to.equal('professional_may2025')
})
it('should map "professional-annual" plan code to stripe lookup keys', function () {
const planCode = 'professional-annual'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('professional_annual')
expect(lookupKey).to.equal('professional_annual_may2025')
})
it('should map "student" plan code to stripe lookup keys', function () {
const planCode = 'student'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('student_monthly')
expect(lookupKey).to.equal('student_may2025')
})
it('shoult map "student_free_trial_7_days" plan code to stripe lookup keys', function () {
const planCode = 'student_free_trial_7_days'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('student_monthly')
expect(lookupKey).to.equal('student_may2025')
})
it('should map "student-annual" plan code to stripe lookup keys', function () {
const planCode = 'student-annual'
const lookupKey =
this.PlansLocator.mapRecurlyPlanCodeToStripeLookupKey(planCode)
expect(lookupKey).to.equal('student_annual')
expect(lookupKey).to.equal('student_annual_may2025')
})
})
@@ -141,7 +141,7 @@ describe('PlansLocator', function () {
addOnCode,
billingCycleInterval
)
expect(lookupKey).to.equal('error_assist_monthly')
expect(lookupKey).to.equal('assistant_may2025')
})
it('returns the key for an annual AI assist add-on', function () {
@@ -151,7 +151,7 @@ describe('PlansLocator', function () {
addOnCode,
billingCycleInterval
)
expect(lookupKey).to.equal('error_assist_annual')
expect(lookupKey).to.equal('assistant_annual_may2025')
})
})
@@ -589,7 +589,7 @@ describe('SubscriptionViewModelBuilder', function () {
describe('isEligibleForGroupPlan', function () {
it('is false for Stripe subscriptions', async function () {
this.paymentRecord.service = 'stripe'
this.paymentRecord.service = 'stripe-us'
const result =
await this.SubscriptionViewModelBuilder.promises.buildUsersSubscriptionViewModel(
this.user
@@ -627,7 +627,7 @@ describe('SubscriptionViewModelBuilder', function () {
describe('isEligibleForPause', function () {
it('is false for Stripe subscriptions', async function () {
this.paymentRecord.service = 'stripe'
this.paymentRecord.service = 'stripe-us'
const result =
await this.SubscriptionViewModelBuilder.promises.buildUsersSubscriptionViewModel(
this.user
@@ -777,7 +777,7 @@ describe('SubscriptionViewModelBuilder', function () {
this.paymentRecord.pausePeriodStart = null
this.paymentRecord.remainingPauseCycles = null
this.paymentRecord.trialPeriodEnd = null
this.paymentRecord.service = 'stripe'
this.paymentRecord.service = 'stripe-us'
const result =
await this.SubscriptionViewModelBuilder.promises.buildUsersSubscriptionViewModel(
this.user
@@ -847,7 +847,7 @@ describe('SubscriptionViewModelBuilder', function () {
})
it('does not add a billing details link for a Stripe subscription', async function () {
this.paymentRecord.service = 'stripe'
this.paymentRecord.service = 'stripe-us'
this.Modules.hooks.fire
.withArgs('getPaymentFromRecord', this.individualSubscription)
.yields(null, [