Browse Source
* 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>pull/3390/head
3 changed files with 53 additions and 14 deletions
@ -0,0 +1,24 @@
@@ -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"; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue