Skip to content

Redirect to pricing page if no plan_id exists in SaaS subscription purchase URL

What does this MR do and why?

Redirect to pricing page on marketing site if no plan_id param exists in SaaS subscription purchase URL

Related to #474561

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Screen Recording 2024-07-30 at 2.25.36 PM.mov Screen Recording 2024-07-30 at 2.27.04 PM.mov

Redirection testing

  • migrate_purchase_flows_for_existing_customers feature flag enabled
  • migrate_purchase_flows_for_new_customers feature flag enabled
Scenario Screenshot

Existing customer accesses purchase link

  • with plan id
  • with plan id and namespace id
  • without plan id and namespace id

Screen Recording 2024-07-30 at 3.02.12 PM.mov

New customer accesses purchase link

  • with plan id
  • with plan id and namespace id
  • without plan id and namespace id

Screen Recording 2024-07-30 at 3.01.17 PM.mov

  • migrate_purchase_flows_for_existing_customers feature flag enabled
  • migrate_purchase_flows_for_new_customers feature flag disabled
Scenario Screenshot

Existing customer accesses purchase link

  • with plan id
  • with plan id and namespace id
  • without plan id and namespace id

Screen Recording 2024-07-30 at 2.59.09 PM.mov

New customer accesses purchase link

  • with plan id
  • with plan id and namespace id
  • without plan id and namespace id

Screen Recording 2024-07-30 at 2.57.32 PM.mov

  • migrate_purchase_flows_for_existing_customers feature flag disabled
  • migrate_purchase_flows_for_new_customers feature flag disabled
Scenario Screenshot

Existing customer accesses purchase link

  • with plan id
  • with plan id and namespace id
  • without plan id and namespace id

Screen Recording 2024-07-30 at 2.54.07 PM.mov

New customer accesses purchase link

  • with plan id
  • with plan id and namespace id
  • without plan id and namespace id

Screen Recording 2024-07-30 at 2.52.54 PM.mov

How to set up and validate locally

  1. Setup Customers Dot
  2. Start GDK in SaaS mode GITLAB_SIMULATE_SAAS=1 gdk start
  3. GitLab: Navigate to http://localhost:3000/-/subscriptions/new
  4. GitLab: Navigate to http://localhost:3000/-/subscriptions/new?plan_id=2c92a00d76f0d5060176f2fb0a5029ff for Premium plan
  5. GitLab: Navigate to http://localhost:3000/-/subscriptions/new?plan_id=2c92a0ff76f0d5250176f2f8c86f305a for Ultimate plan
Edited by Vamsi Vempati

Merge request reports

Loading