mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Fix some checkout page if RootPath is set (#659)
This commit is contained in:
@@ -273,6 +273,7 @@ namespace BTCPayServer.Controllers
|
|||||||
var model = new PaymentModel()
|
var model = new PaymentModel()
|
||||||
{
|
{
|
||||||
CryptoCode = network.CryptoCode,
|
CryptoCode = network.CryptoCode,
|
||||||
|
RootPath = this.Request.PathBase.Value.WithTrailingSlash(),
|
||||||
PaymentMethodId = paymentMethodId.ToString(),
|
PaymentMethodId = paymentMethodId.ToString(),
|
||||||
PaymentMethodName = GetDisplayName(paymentMethodId, network),
|
PaymentMethodName = GetDisplayName(paymentMethodId, network),
|
||||||
CryptoImage = GetImage(paymentMethodId, network),
|
CryptoImage = GetImage(paymentMethodId, network),
|
||||||
@@ -345,9 +346,8 @@ namespace BTCPayServer.Controllers
|
|||||||
|
|
||||||
private string GetImage(PaymentMethodId paymentMethodId, BTCPayNetwork network)
|
private string GetImage(PaymentMethodId paymentMethodId, BTCPayNetwork network)
|
||||||
{
|
{
|
||||||
var res = paymentMethodId.PaymentType == PaymentTypes.BTCLike ?
|
return paymentMethodId.PaymentType == PaymentTypes.BTCLike ?
|
||||||
Url.Content(network.CryptoImagePath) : Url.Content(network.LightningImagePath);
|
this.Request.GetRelativePathOrAbsolute(network.CryptoImagePath) : this.Request.GetRelativePathOrAbsolute(network.LightningImagePath);
|
||||||
return "/" + res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string OrderAmountFromInvoice(string cryptoCode, ProductInformation productInformation)
|
private string OrderAmountFromInvoice(string cryptoCode, ProductInformation productInformation)
|
||||||
|
|||||||
@@ -64,5 +64,6 @@ namespace BTCPayServer.Models.InvoicingModels
|
|||||||
public bool CoinSwitchEnabled { get; set; }
|
public bool CoinSwitchEnabled { get; set; }
|
||||||
public string CoinSwitchMode { get; set; }
|
public string CoinSwitchMode { get; set; }
|
||||||
public string CoinSwitchMerchantId { get; set; }
|
public string CoinSwitchMerchantId { get; set; }
|
||||||
|
public string RootPath { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
.use(window.i18nextXHRBackend)
|
.use(window.i18nextXHRBackend)
|
||||||
.init({
|
.init({
|
||||||
backend: {
|
backend: {
|
||||||
loadPath: '/locales/{{lng}}.json'
|
loadPath: '@(Model.RootPath)locales/{{lng}}.json'
|
||||||
},
|
},
|
||||||
lng: startingLanguage,
|
lng: startingLanguage,
|
||||||
fallbackLng: fallbackLanguage,
|
fallbackLng: fallbackLanguage,
|
||||||
|
|||||||
Reference in New Issue
Block a user