diff --git a/src/Admin/Utilities/WebHostEnvironmentExtensions.cs b/src/Admin/Utilities/WebHostEnvironmentExtensions.cs new file mode 100644 index 0000000000..9602d4c76d --- /dev/null +++ b/src/Admin/Utilities/WebHostEnvironmentExtensions.cs @@ -0,0 +1,24 @@ +namespace Bit.Admin.Utilities; + +public static class WebHostEnvironmentExtensions +{ + public static string GetStripeUrl(this IWebHostEnvironment hostingEnvironment) + { + if (hostingEnvironment.IsDevelopment() || hostingEnvironment.IsEnvironment("QA")) + { + return "https://dashboard.stripe.com/test"; + } + + return "https://dashboard.stripe.com"; + } + + public static string GetBraintreeMerchantUrl(this IWebHostEnvironment hostingEnvironment) + { + if (hostingEnvironment.IsDevelopment() || hostingEnvironment.IsEnvironment("QA")) + { + return "https://www.sandbox.braintreegateway.com/merchants"; + } + + return "https://www.braintreegateway.com/merchants"; + } +} diff --git a/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml b/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml index 88dc8a78c1..69fd55dc21 100644 --- a/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml +++ b/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml @@ -1,3 +1,5 @@ +@inject IWebHostEnvironment HostingEnvironment +@using Bit.Admin.Utilities @model OrganizationEditModel