mirror of
https://github.com/bitwarden/server.git
synced 2025-04-18 03:28:15 -05:00

* 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>
25 lines
749 B
C#
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";
|
|
}
|
|
}
|