mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 17:12:49 -05:00
[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>
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
@inject IWebHostEnvironment HostingEnvironment
|
||||
@using Bit.Admin.Utilities
|
||||
@model OrganizationEditModel
|
||||
|
||||
<script>
|
||||
@ -15,10 +17,11 @@
|
||||
return;
|
||||
}
|
||||
if (gateway.value === '@((byte)GatewayType.Stripe)') {
|
||||
window.open('https://dashboard.stripe.com/customers/' + customerId.value, '_blank');
|
||||
const url = `@(HostingEnvironment.GetStripeUrl())/customers/${customerId.value}/`;
|
||||
window.open(url, '_blank');
|
||||
} else if (gateway.value === '@((byte)GatewayType.Braintree)') {
|
||||
window.open('https://www.braintreegateway.com/merchants/@(Model.BraintreeMerchantId)/'
|
||||
+ customerId.value, '_blank');
|
||||
const url = `@(HostingEnvironment.GetBraintreeMerchantUrl())/@Model.BraintreeMerchantId/${customerId.value}`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
});
|
||||
document.getElementById('gateway-subscription-link')?.addEventListener('click', () => {
|
||||
@ -28,10 +31,11 @@
|
||||
return;
|
||||
}
|
||||
if (gateway.value === '@((byte)GatewayType.Stripe)') {
|
||||
window.open('https://dashboard.stripe.com/subscriptions/' + subId.value, '_blank');
|
||||
const url = `@(HostingEnvironment.GetStripeUrl())/subscriptions/${subId.value}/`;
|
||||
window.open(url, '_blank');
|
||||
} else if (gateway.value === '@((byte)GatewayType.Braintree)') {
|
||||
window.open('https://www.braintreegateway.com/merchants/@(Model.BraintreeMerchantId)/' +
|
||||
'subscriptions/' + subId.value, '_blank');
|
||||
const url = `@(HostingEnvironment.GetBraintreeMerchantUrl())/@Model.BraintreeMerchantId/subscriptions/${subId.value}`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
});
|
||||
document.getElementById('@(nameof(Model.UseSecretsManager))').addEventListener('change', (event) => {
|
||||
|
Reference in New Issue
Block a user