updates in save settings
This commit is contained in:
parent
32997ff252
commit
fb92ef739b
@ -153,7 +153,9 @@ namespace Nop.Plugin.Payments.BTCPayServer.Controllers
|
||||
settings.BtcPayStoreID = "";
|
||||
settings.WebHookSecret = "";
|
||||
settings.BtcPayUrl = "";
|
||||
await _settingService.SaveSettingAsync<BtcPaySettings>(settings);
|
||||
ModelState.Clear();
|
||||
|
||||
_paymentSettings.ActivePaymentMethodSystemNames.Remove("Payments.BTCPayServer");
|
||||
|
||||
_notificationService.SuccessNotification("Settings cleared and payment method deactivated");
|
||||
@ -172,6 +174,8 @@ namespace Nop.Plugin.Payments.BTCPayServer.Controllers
|
||||
if (command == "getautomaticapikeyconfig")
|
||||
{
|
||||
settings.BtcPayUrl = model.BtcPayUrl;
|
||||
await _settingService.SaveSettingAsync<BtcPaySettings>(settings);
|
||||
|
||||
string? result = GetRedirectUri(settings);
|
||||
if (result != null)
|
||||
{
|
||||
|
||||
@ -189,7 +189,7 @@ namespace Nop.Plugin.Payments.BTCPayServer.Services
|
||||
await _orderService.InsertOrderNoteAsync(new OrderNote
|
||||
{
|
||||
OrderId = order.Id,
|
||||
Note = $"BTCPayServer: Payment received {(order.PaymentStatus is PaymentStatus.Authorized ? $"but waiting to confirm. <a href='{order.AuthorizationTransactionResult}'>Click here for more information.</a>" : $". <a href='{order.CaptureTransactionResult}'>Click here for more information.</a>")}",
|
||||
Note = $"BTCPayServer: Payment received{(order.PaymentStatus is PaymentStatus.Authorized ? $" but waiting to confirm. <a href='{order.AuthorizationTransactionResult}'>Click here for more information.</a>" : $". <a href='{order.CaptureTransactionResult}'>Click here for more information.</a>")}",
|
||||
DisplayToCustomer = true,
|
||||
CreatedOnUtc = DateTime.UtcNow
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user