1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-18 03:28:15 -05:00
bitwarden/src/Admin/Utilities/WebHostEnvironmentExtensions.cs
Conner Turnbull 1af105a9e2
[BEEEP] Update development and QA dashboard URLs for payment gateways (#3291)
* Update development and QA dashboard URLs for payment gateways

* Refactor gateway URL creation to utility method

---------

Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
2023-10-30 14:15:33 -04:00

25 lines
749 B
C#

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";
}
}