From 7b7c5752c3e3816c5928f68bd1a45cd4cd1ffc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Knuchel?= Date: Wed, 26 Jun 2024 14:47:30 +0200 Subject: [PATCH] Add special support for enterprise plan --- .env.example | 5 +- INSTALL.md | 5 +- backend/config/runtime.exs | 7 +- backend/lib/azimutt/organizations.ex | 49 +++++++----- .../organizations/organization_plan.ex | 24 +++--- backend/lib/azimutt/services/cockpit_srv.ex | 4 +- backend/lib/azimutt/services/stripe_srv.ex | 7 +- .../organization_billing_controller.ex | 2 +- backend/lib/azimutt_web/router.ex | 2 +- .../templates/blog/_blog_footer.html.heex | 2 +- .../organization/_subscription_show.html.heex | 2 +- .../templates/organization/billing.html.heex | 80 ++++++++++--------- .../organization/subscribe.html.heex | 2 +- .../organization_member/index.html.heex | 10 +-- .../templates/website/_footer.html.heex | 2 +- .../website/feature-support.html.heex | 2 +- .../templates/website/index.html.heex | 2 +- .../lib/azimutt_web/views/api/health_view.ex | 2 +- .../test/azimutt/services/stripe_srv_test.exs | 4 +- 19 files changed, 120 insertions(+), 93 deletions(-) diff --git a/.env.example b/.env.example index 18cb31116..9e0945812 100644 --- a/.env.example +++ b/.env.example @@ -47,8 +47,10 @@ export FILE_STORAGE_ADAPTER=local # export SMTP_PASSWORD= # export SMTP_PORT= -# export SUPPORT_EMAIL= # export SENDER_EMAIL= +# export CONTACT_EMAIL= +# export SUPPORT_EMAIL= +# export ENTERPRISE_SUPPORT_EMAIL= # Key features @@ -125,6 +127,7 @@ export AUTH_PASSWORD=true # export STRIPE_PRICE_SOLO_YEARLY= # export STRIPE_PRICE_TEAM_MONTHLY= # export STRIPE_PRICE_TEAM_YEARLY= +# export STRIPE_PRODUCT_ENTERPRISE= # export STRIPE_PRICE_PRO_MONTHLY= ## Clever Cloud Addon diff --git a/INSTALL.md b/INSTALL.md index be668d171..9c40223ba 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -154,8 +154,10 @@ These are the basic variables you will **need** to set up Azimutt: - `SMTP_USERNAME` (required) - `SMTP_PASSWORD` (required) - `SMTP_PORT` (required) -- `SUPPORT_EMAIL` (optional, default `contact@azimutt.app`): email shown in Azimutt when users need support - `SENDER_EMAIL` (optional, default `contact@azimutt.app`): email Azimutt will us to send emails +- `CONTACT_EMAIL` (optional, default `contact@azimutt.app`): email shown in Azimutt to reach out +- `SUPPORT_EMAIL` (optional, default `contact@azimutt.app`): email shown in Azimutt when users need support +- `ENTERPRISE_SUPPORT_EMAIL` (optional, default `contact@azimutt.app`): email shown in Azimutt for high priority support ### Key features @@ -211,6 +213,7 @@ At least one of authentication methods should be defined: - `STRIPE_PRICE_SOLO_YEARLY` (required): Stripe price for the yearly solo plan (ex: `price_uJINukB78aAbajUQHy6Ra523`) - `STRIPE_PRICE_TEAM_MONTHLY` (required): Stripe price for the monthly team plan (ex: `price_uJINukB78aAbajUQHy6Ra523`) - `STRIPE_PRICE_TEAM_YEARLY` (required): Stripe price for the yearly team plan (ex: `price_uJINukB78aAbajUQHy6Ra523`) + - `STRIPE_PRODUCT_ENTERPRISE` (required): Stripe product for enterprise plan (ex: `prod_eBlQLUZPVprdAo`) - `STRIPE_PRICE_PRO_MONTHLY` (required): Stripe price for the monthly legacy pro plan (ex: `price_uJINukB78aAbajUQHy6Ra523`) - `CLEVER_CLOUD` (optional): if `true`, enable auth & hooks for [Clever Cloud Add-on](https://www.clever-cloud.com/doc/extend/add-ons-api) - `CLEVER_CLOUD_ADDON_ID` (required) diff --git a/backend/config/runtime.exs b/backend/config/runtime.exs index f8cb61a32..9fbb8d5f2 100644 --- a/backend/config/runtime.exs +++ b/backend/config/runtime.exs @@ -33,8 +33,10 @@ config :azimutt, organization_default_plan: System.get_env("ORGANIZATION_DEFAULT_PLAN"), global_organization: global_organization, global_organization_alone: global_organization && System.get_env("GLOBAL_ORGANIZATION_ALONE") == "true", - support_email: System.get_env("SUPPORT_EMAIL") || "contact@azimutt.app", - sender_email: System.get_env("SENDER_EMAIL") || "contact@azimutt.app", + sender_email: System.get_env("SENDER_EMAIL") || Azimutt.config(:azimutt_email), + contact_email: System.get_env("CONTACT_EMAIL") || Azimutt.config(:azimutt_email), + support_email: System.get_env("SUPPORT_EMAIL") || System.get_env("CONTACT_EMAIL") || Azimutt.config(:azimutt_email), + enterprise_support_email: System.get_env("ENTERPRISE_SUPPORT_EMAIL") || System.get_env("SUPPORT_EMAIL") || System.get_env("CONTACT_EMAIL") || Azimutt.config(:azimutt_email), server_started: DateTime.utc_now() config :azimutt, Azimutt.Repo, @@ -274,6 +276,7 @@ if System.get_env("STRIPE") == "true" do stripe_price_solo_yearly: System.fetch_env!("STRIPE_PRICE_SOLO_YEARLY"), stripe_price_team_monthly: System.fetch_env!("STRIPE_PRICE_TEAM_MONTHLY"), stripe_price_team_yearly: System.fetch_env!("STRIPE_PRICE_TEAM_YEARLY"), + stripe_product_enterprise: System.fetch_env!("STRIPE_PRODUCT_ENTERPRISE"), stripe_price_pro_monthly: System.fetch_env!("STRIPE_PRICE_PRO_MONTHLY") config :stripity_stripe, diff --git a/backend/lib/azimutt/organizations.ex b/backend/lib/azimutt/organizations.ex index 725d18e90..cd0821627 100644 --- a/backend/lib/azimutt/organizations.ex +++ b/backend/lib/azimutt/organizations.ex @@ -271,23 +271,7 @@ defmodule Azimutt.Organizations do def get_subscriptions(%Organization{} = organization) do StripeSrv.get_subscriptions(organization.stripe_customer_id) - |> Result.map(fn subs -> - subs.data - |> Enum.map(fn sub -> - %{ - id: sub.id, - customer: sub.customer, - status: sub.status, - promotion_code: sub.promotion_code, - price: sub.plan.id, - product: sub.plan.product, - freq: sub.plan.interval, - quantity: sub.quantity, - cancel_at: if(sub.cancel_at != nil, do: DateTime.from_unix!(sub.cancel_at), else: nil), - created: DateTime.from_unix!(sub.created) - } - end) - end) + |> Result.map(fn subs -> subs.data |> Enum.map(fn sub -> subscription_to_hash(sub) end) end) end def allow_table_color(%Organization{} = organization, tweet_url) when is_binary(tweet_url) do @@ -470,15 +454,20 @@ defmodule Azimutt.Organizations do {:ok, %{plan: plan, plan_freq: "monthly", plan_status: "manual", plan_seats: seats}} end + # credo:disable-for-lines:20 Credo.Check.Refactor.Nesting defp validate_stripe_plan(customer_id) do StripeSrv.get_subscriptions(customer_id) |> Result.map(fn subs -> if length(subs.data) > 0 do - sub = hd(subs.data) - {plan, freq} = StripeSrv.get_plan(sub.plan.id) + sub = subscription_to_hash(hd(subs.data)) + {plan, freq} = StripeSrv.get_plan(sub.product, sub.price) if ["trialing", "active", "past_due", "unpaid"] |> Enum.member?(sub.status) do - %{plan: plan, plan_freq: freq, plan_status: sub.status, plan_seats: sub.quantity} + if plan == "enterprise" do + %{plan: plan, plan_freq: freq, plan_status: sub.status, plan_seats: sub.metadata.seats || sub.quantity} + else + %{plan: plan, plan_freq: freq, plan_status: sub.status, plan_seats: sub.quantity} + end else %{plan: "free", plan_freq: freq, plan_status: sub.status, plan_seats: 1} end @@ -501,4 +490,24 @@ defmodule Azimutt.Organizations do is_integer(b) -> b end end + + defp subscription_to_hash(sub) do + %{ + id: sub.id, + customer: sub.customer, + status: sub.status, + promotion_code: sub.promotion_code, + price: sub.plan.id, + product: sub.plan.product, + freq: sub.plan.interval, + quantity: sub.quantity, + metadata: %{ + seats: if(is_binary(sub.metadata["seats"]), do: String.to_integer(sub.metadata["seats"]), else: nil), + projects: if(is_binary(sub.metadata["projects"]), do: String.to_integer(sub.metadata["projects"]), else: nil), + databases: if(is_binary(sub.metadata["databases"]), do: String.to_integer(sub.metadata["databases"]), else: nil) + }, + cancel_at: if(sub.cancel_at != nil, do: DateTime.from_unix!(sub.cancel_at), else: nil), + created: DateTime.from_unix!(sub.created) + } + end end diff --git a/backend/lib/azimutt/organizations/organization_plan.ex b/backend/lib/azimutt/organizations/organization_plan.ex index fd0b3058e..9a04b4731 100644 --- a/backend/lib/azimutt/organizations/organization_plan.ex +++ b/backend/lib/azimutt/organizations/organization_plan.ex @@ -82,19 +82,19 @@ defmodule Azimutt.Organizations.OrganizationPlan do def enterprise do %OrganizationPlan{ - id: Azimutt.plans().enterpprise.id, - name: Azimutt.plans().enterpprise.name, - projects: Azimutt.limits().projects.enterpprise, - layouts: Azimutt.limits().project_layouts.enterpprise, - layout_tables: Azimutt.limits().layout_tables.enterpprise, - memos: Azimutt.limits().project_doc.enterpprise, - groups: Azimutt.limits().project_doc.enterpprise, - colors: Azimutt.limits().colors.enterpprise, + id: Azimutt.plans().enterprise.id, + name: Azimutt.plans().enterprise.name, + projects: Azimutt.limits().projects.enterprise, + layouts: Azimutt.limits().project_layouts.enterprise, + layout_tables: Azimutt.limits().layout_tables.enterprise, + memos: Azimutt.limits().project_doc.enterprise, + groups: Azimutt.limits().project_doc.enterprise, + colors: Azimutt.limits().colors.enterprise, local_save: true, - private_links: Azimutt.limits().project_share.enterpprise, - sql_export: Azimutt.limits().schema_export.enterpprise, - db_analysis: Azimutt.limits().analysis.enterpprise != "preview", - db_access: Azimutt.limits().data_exploration.enterpprise, + private_links: Azimutt.limits().project_share.enterprise, + sql_export: Azimutt.limits().schema_export.enterprise, + db_analysis: Azimutt.limits().analysis.enterprise != "preview", + db_access: Azimutt.limits().data_exploration.enterprise, streak: 0 } end diff --git a/backend/lib/azimutt/services/cockpit_srv.ex b/backend/lib/azimutt/services/cockpit_srv.ex index 75b8751b5..acaf2e349 100644 --- a/backend/lib/azimutt/services/cockpit_srv.ex +++ b/backend/lib/azimutt/services/cockpit_srv.ex @@ -157,8 +157,8 @@ defmodule Azimutt.Services.CockpitSrv do organization_default_plan: System.get_env("ORGANIZATION_DEFAULT_PLAN"), global_organization: System.get_env("GLOBAL_ORGANIZATION"), global_organization_alone: System.get_env("GLOBAL_ORGANIZATION_ALONE"), - support: System.get_env("SUPPORT_EMAIL"), sender: System.get_env("SENDER_EMAIL"), + support: System.get_env("SUPPORT_EMAIL"), gateway: System.get_env("GATEWAY_URL"), auth: %{ @@ -231,7 +231,7 @@ defmodule Azimutt.Services.CockpitSrv do end defp contact_us do - "contact us at #{Azimutt.config(:azimutt_email)}" + "contact us at #{Azimutt.config(:contact_email)}" end defp set_error_message(message) do diff --git a/backend/lib/azimutt/services/stripe_srv.ex b/backend/lib/azimutt/services/stripe_srv.ex index 205d4127a..5c961c3ae 100644 --- a/backend/lib/azimutt/services/stripe_srv.ex +++ b/backend/lib/azimutt/services/stripe_srv.ex @@ -67,6 +67,7 @@ defmodule Azimutt.Services.StripeSrv do end def create_session(%{customer: customer, success_url: success_url, cancel_url: cancel_url, price_id: price_id, quantity: quantity, free_trial: free_trial}) do + # https://docs.stripe.com/api/checkout/sessions/create if stripe_configured?() do Stripe.Session.create(%{ mode: "subscription", @@ -89,6 +90,7 @@ defmodule Azimutt.Services.StripeSrv do }, else: %{} ), + automatic_tax: %{enabled: true}, payment_method_collection: "if_required", allow_promotion_codes: true, success_url: success_url, @@ -120,15 +122,14 @@ defmodule Azimutt.Services.StripeSrv do end end - def get_plan(price) do + def get_plan(product, price) do cond do price == Azimutt.config(:stripe_price_solo_monthly) -> {"solo", "monthly"} price == Azimutt.config(:stripe_price_solo_yearly) -> {"solo", "yearly"} price == Azimutt.config(:stripe_price_team_monthly) -> {"team", "monthly"} price == Azimutt.config(:stripe_price_team_yearly) -> {"team", "yearly"} price == Azimutt.config(:stripe_price_pro_monthly) -> {"pro", "monthly"} - # TODO: remove, it's useful in dev because I used several team plans :/ - true -> {"team", "yearly"} + product == Azimutt.config(:stripe_product_enterprise) -> {"enterprise", "yearly"} end end diff --git a/backend/lib/azimutt_web/controllers/organization_billing_controller.ex b/backend/lib/azimutt_web/controllers/organization_billing_controller.ex index dace75dbf..76bb74509 100644 --- a/backend/lib/azimutt_web/controllers/organization_billing_controller.ex +++ b/backend/lib/azimutt_web/controllers/organization_billing_controller.ex @@ -125,7 +125,7 @@ defmodule AzimuttWeb.OrganizationBillingController do Tracking.subscribe_abort(current_user, organization) conn - |> put_flash(:info, "Did you changed your mind? Let us know if you need clarifications: #{Azimutt.config(:azimutt_email)}") + |> put_flash(:info, "Did you changed your mind? Let us know if you need clarifications: #{Azimutt.config(:contact_email)}") |> redirect(to: Routes.organization_billing_path(conn, :index, organization, source: "billing-cancel")) end end diff --git a/backend/lib/azimutt_web/router.ex b/backend/lib/azimutt_web/router.ex index e3956f57d..5bc63953a 100644 --- a/backend/lib/azimutt_web/router.ex +++ b/backend/lib/azimutt_web/router.ex @@ -266,7 +266,7 @@ defmodule AzimuttWeb.Router do description: "API Documentation for Azimutt Backend", contact: %{ name: "Azimutt", - email: Azimutt.config(:azimutt_email) + email: Azimutt.config(:contact_email) } }, basePath: "/api/v1", diff --git a/backend/lib/azimutt_web/templates/blog/_blog_footer.html.heex b/backend/lib/azimutt_web/templates/blog/_blog_footer.html.heex index d56ab5d05..d40c01126 100644 --- a/backend/lib/azimutt_web/templates/blog/_blog_footer.html.heex +++ b/backend/lib/azimutt_web/templates/blog/_blog_footer.html.heex @@ -17,7 +17,7 @@ - + diff --git a/backend/lib/azimutt_web/templates/organization/_subscription_show.html.heex b/backend/lib/azimutt_web/templates/organization/_subscription_show.html.heex index 186ae6685..ac34d0c00 100644 --- a/backend/lib/azimutt_web/templates/organization/_subscription_show.html.heex +++ b/backend/lib/azimutt_web/templates/organization/_subscription_show.html.heex @@ -1,4 +1,4 @@ -<% {plan_id, freq} = Azimutt.Services.StripeSrv.get_plan(@subscription.price) %> +<% {plan_id, freq} = Azimutt.Services.StripeSrv.get_plan(@subscription.product, @subscription.price) %> <% plan = Azimutt.plans()[String.to_atom(plan_id)] %> <%= plan.name %> plan, <%= freq %>: <%= @subscription.status %> diff --git a/backend/lib/azimutt_web/templates/organization/billing.html.heex b/backend/lib/azimutt_web/templates/organization/billing.html.heex index 0acfe9f85..5216e17d6 100644 --- a/backend/lib/azimutt_web/templates/organization/billing.html.heex +++ b/backend/lib/azimutt_web/templates/organization/billing.html.heex @@ -1,43 +1,51 @@

Billing

-

- Thank you for using Azimutt. - You are currently on <%= AzimuttWeb.LayoutView.plan_badge(@organization.plan) %> - <%= if @organization.plan_seats > 1 do %> - with <%= @organization.plan_seats %> seats. - <% end %> -
- <% max_seats = Azimutt.limits().users[String.to_atom(@organization.plan)] %> - <%= if max_seats == nil || max_seats > 1 do %> - Change you seats using the "Manage your subscription" button. - <% end %> -

-
- <%= if length(@subscriptions) > 1 do %> -
-
-
- -
-
-

You have <%= length(@subscriptions) %> subscriptions.

-
- Having several subscriptions is not expected.
- Click on "Manage your subscription" below and cancel the bad one. + <%= if @organization.plan == "enterprise" do %> +

+ Thank you for using Azimutt. + You are currently on <%= AzimuttWeb.LayoutView.plan_badge(@organization.plan) %>
+ For any change or question, please contact
<%= Azimutt.config(:enterprise_support_email) %>. +

+ <% else %> +

+ Thank you for using Azimutt. + You are currently on <%= AzimuttWeb.LayoutView.plan_badge(@organization.plan) %> + <%= if @organization.plan_seats > 1 do %> + with <%= @organization.plan_seats %> seats. + <% end %> +
+ <% max_seats = Azimutt.limits().users[String.to_atom(@organization.plan)] %> + <%= if max_seats == nil || max_seats > 1 do %> + Change you seats using the "Manage your subscription" button. + <% end %> +

+
+ <%= if length(@subscriptions) > 1 do %> +
+
+
+
-
- Your subscriptions: -
    - <%= for subscription <- @subscriptions do %> -
  • <%= render "_subscription_show.html", subscription: subscription %>
  • - <% end %> -
+
+

You have <%= length(@subscriptions) %> subscriptions.

+
+ Having several subscriptions is not expected.
+ Click on "Manage your subscription" below and cancel the bad one. +
+
+ Your subscriptions: +
    + <%= for subscription <- @subscriptions do %> +
  • <%= render "_subscription_show.html", subscription: subscription %>
  • + <% end %> +
+
-
- <% end %> - <%= link "Manage your subscription", to: Routes.organization_billing_path(@conn, :edit, @organization.id), method: :post, class: "mt-6 inline-flex items-center px-4 py-2 border border-transparent shadow-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm" %> - <%= link "Refresh plan", to: Routes.organization_billing_path(@conn, :refresh, @organization.id), method: :post, title: "If your plan is out of sync, you can manually refresh it by clicking here.", class: "mt-3 block text-sm underline" %> -
+ <% end %> + <%= link "Manage your subscription", to: Routes.organization_billing_path(@conn, :edit, @organization.id), method: :post, class: "mt-6 inline-flex items-center px-4 py-2 border border-transparent shadow-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm" %> + <%= link "Refresh plan", to: Routes.organization_billing_path(@conn, :refresh, @organization.id), method: :post, title: "If your plan is out of sync, you can manually refresh it by clicking here.", class: "mt-3 block text-sm underline" %> +
+ <% end %>
diff --git a/backend/lib/azimutt_web/templates/organization/subscribe.html.heex b/backend/lib/azimutt_web/templates/organization/subscribe.html.heex index dfb2955a6..76b8eea58 100644 --- a/backend/lib/azimutt_web/templates/organization/subscribe.html.heex +++ b/backend/lib/azimutt_web/templates/organization/subscribe.html.heex @@ -4,7 +4,7 @@ Recurrent Azimutt user? Choose the plan that suit you more.
More details on pricing page. - Don't hesitate to reach out for any question. + Don't hesitate to reach out for any question.

diff --git a/backend/lib/azimutt_web/templates/organization_member/index.html.heex b/backend/lib/azimutt_web/templates/organization_member/index.html.heex index 74e713453..b9f801f44 100644 --- a/backend/lib/azimutt_web/templates/organization_member/index.html.heex +++ b/backend/lib/azimutt_web/templates/organization_member/index.html.heex @@ -16,27 +16,27 @@ <%= cond do %> <% plan_seats > max_seats -> %> Your plan has more seats than its maximum 😅
- Please contact us to find out why ^^ + Please contact us to find out why ^^ <% used_seats > plan_seats -> %> You are using more seats than allowed by your plan 😅
Please adjust it - or contact us to find out why ^^ + or contact us to find out why ^^ <% max_seats == 1 -> %> Your plan does not allow collaboration, upgrade to invite people. <% used_seats == plan_seats && plan_seats == max_seats -> %> You are using all the available seats of your plan.
Upgrade - or contact us + or contact us to invite more people. <% used_seats == plan_seats && plan_seats < max_seats -> %> You are using all of your seats.
Add some to invite more people. <% used_seats < plan_seats -> %> - You have <%= Azimutt.Utils.Stringx.pluralize(plan_seats - used_seats, "seat") %> remaining in your plan.
+ You have <%= Azimutt.Utils.Stringx.pluralize(plan_seats - used_seats, "remaining seat") %> in your plan.
You can invite more people. <% true -> %> You are in an unexpected situation 😱
- Please contact us to find out why ^^ + Please contact us to find out why ^^ <% end %>

diff --git a/backend/lib/azimutt_web/templates/website/_footer.html.heex b/backend/lib/azimutt_web/templates/website/_footer.html.heex index c656760d6..4d0f9b1bc 100644 --- a/backend/lib/azimutt_web/templates/website/_footer.html.heex +++ b/backend/lib/azimutt_web/templates/website/_footer.html.heex @@ -59,7 +59,7 @@
  • Slack
  • Documentation
  • GitHub issues
  • -
  • Email us
  • +
  • Email us
  • diff --git a/backend/lib/azimutt_web/templates/website/feature-support.html.heex b/backend/lib/azimutt_web/templates/website/feature-support.html.heex index 4200500e4..459ead1f8 100644 --- a/backend/lib/azimutt_web/templates/website/feature-support.html.heex +++ b/backend/lib/azimutt_web/templates/website/feature-support.html.heex @@ -12,7 +12,7 @@ diff --git a/backend/lib/azimutt_web/templates/website/index.html.heex b/backend/lib/azimutt_web/templates/website/index.html.heex index 26fe844af..aa8b1dafc 100644 --- a/backend/lib/azimutt_web/templates/website/index.html.heex +++ b/backend/lib/azimutt_web/templates/website/index.html.heex @@ -246,7 +246,7 @@ Slack, Twitter, GitHub or - Email. + Email.

    Join 3500+ early adopters diff --git a/backend/lib/azimutt_web/views/api/health_view.ex b/backend/lib/azimutt_web/views/api/health_view.ex index 358477db4..8b1ab9b83 100644 --- a/backend/lib/azimutt_web/views/api/health_view.ex +++ b/backend/lib/azimutt_web/views/api/health_view.ex @@ -40,8 +40,8 @@ defmodule AzimuttWeb.Api.HealthView do organization_default_plan: Azimutt.config(:organization_default_plan), global_organization: Azimutt.config(:global_organization), global_organization_alone: Azimutt.config(:global_organization_alone), - support_email: Azimutt.config(:support_email), sender_email: Azimutt.config(:sender_email), + support_email: Azimutt.config(:support_email), file_storage: Azimutt.config(:file_storage), email_service: Azimutt.config(:email_service), auth_password: Azimutt.config(:auth_password), diff --git a/backend/test/azimutt/services/stripe_srv_test.exs b/backend/test/azimutt/services/stripe_srv_test.exs index fb9c227d8..6fd19dc16 100644 --- a/backend/test/azimutt/services/stripe_srv_test.exs +++ b/backend/test/azimutt/services/stripe_srv_test.exs @@ -5,8 +5,8 @@ defmodule Azimutt.Services.StripeSrvTest do describe "StripeSrv" do @tag :skip test "create_customer" do - {:ok, customer} = StripeSrv.create_customer("orga_id", "Azimutt", "contact@azimutt.app", nil, false, "Loïc", "loic@mail.com") - {:ok, _} = StripeSrv.update_customer(customer, "orga_id", "Azimutt 2", "contact2@azimutt.app", nil, false, "Loïc", "loic@mail.com") + {:ok, customer} = StripeSrv.create_customer("orga_id", "Azimutt", "hello@azimutt.app", nil, false, "Loïc", "loic@mail.com") + {:ok, _} = StripeSrv.update_customer(customer, "orga_id", "Azimutt 2", "hello2@azimutt.app", nil, false, "Loïc", "loic@mail.com") {:ok, _} = StripeSrv.delete_customer(customer) end