From c80c2898648941dca58f23f9ef972ae0f3f99c4d Mon Sep 17 00:00:00 2001 From: Bruce Atkinson Date: Mon, 2 Sep 2019 10:04:28 +0200 Subject: [PATCH 1/2] = 4.2.0 = * Release for nopCommerce 4.2 --- .../Controllers/PaymentPayGateController.cs | 21 +++++++++++-------- .../Models/ConfigurationModel.cs | 0 .../Nop.Plugin.Payments.PayGate.csproj | 2 +- .../PayGatePaymentProcessor.cs | 4 +++- .../PayGatePaymentSettings.cs | 0 Nop.Plugin.Payments.PayGate/plugin.json | 4 ++-- 6 files changed, 18 insertions(+), 13 deletions(-) mode change 100755 => 100644 Nop.Plugin.Payments.PayGate/Controllers/PaymentPayGateController.cs mode change 100755 => 100644 Nop.Plugin.Payments.PayGate/Models/ConfigurationModel.cs mode change 100755 => 100644 Nop.Plugin.Payments.PayGate/PayGatePaymentProcessor.cs mode change 100755 => 100644 Nop.Plugin.Payments.PayGate/PayGatePaymentSettings.cs diff --git a/Nop.Plugin.Payments.PayGate/Controllers/PaymentPayGateController.cs b/Nop.Plugin.Payments.PayGate/Controllers/PaymentPayGateController.cs old mode 100755 new mode 100644 index 5c10bac..bca19d1 --- a/Nop.Plugin.Payments.PayGate/Controllers/PaymentPayGateController.cs +++ b/Nop.Plugin.Payments.PayGate/Controllers/PaymentPayGateController.cs @@ -19,6 +19,7 @@ using Nop.Web.Framework; using Nop.Web.Framework.Controllers; using Nop.Web.Framework.Mvc.Filters; +using Nop.Services.Messages; namespace Nop.Plugin.Payments.PayGate.Controllers { @@ -35,6 +36,7 @@ public class PaymentPayGateController : BasePaymentController private readonly ILocalizationService _localizationService; private readonly PayGatePaymentSettings _payGatePaymentSettings; private readonly IPermissionService _permissionService; + private readonly INotificationService _notificationService; private ILogger _logger; #endregion @@ -49,7 +51,8 @@ public PaymentPayGateController(IWorkContext workContext, ILocalizationService localizationService, IPermissionService permissionService, ILogger logger, - PayGatePaymentSettings payGatePaymentSettings) + PayGatePaymentSettings payGatePaymentSettings, + INotificationService notificationService) { this._workContext = workContext; this._storeService = storeService; @@ -60,6 +63,7 @@ public PaymentPayGateController(IWorkContext workContext, this._permissionService = permissionService; this._payGatePaymentSettings = payGatePaymentSettings; this._logger = logger; + this._notificationService = notificationService; } #endregion @@ -308,33 +312,32 @@ public IActionResult Configure(ConfigurationModel model) if (model.UseSandbox_OverrideForStore || storeScope == 0) _settingService.SaveSetting(payGatePaymentSettings, x => x.UseSandbox, storeScope, false); else if (storeScope > 0) - _settingService.DeleteSetting(payGatePaymentSettings, x => x.UseSandbox, storeScope); + _settingService.SaveSetting(payGatePaymentSettings, x => x.UseSandbox, storeScope); if (model.PayGateID_OverrideForStore || storeScope == 0) _settingService.SaveSetting(payGatePaymentSettings, x => x.PayGateID, storeScope, false); else if (storeScope > 0) - _settingService.DeleteSetting(payGatePaymentSettings, x => x.PayGateID, storeScope); + _settingService.SaveSetting(payGatePaymentSettings, x => x.PayGateID, storeScope); if (model.EncryptionKey_OverrideForStore || storeScope == 0) _settingService.SaveSetting(payGatePaymentSettings, x => x.EncryptionKey, storeScope, false); else if (storeScope > 0) - _settingService.DeleteSetting(payGatePaymentSettings, x => x.EncryptionKey, storeScope); + _settingService.SaveSetting(payGatePaymentSettings, x => x.EncryptionKey, storeScope); if (model.EnableIpn_OverrideForStore || storeScope == 0) _settingService.SaveSetting(payGatePaymentSettings, x => x.EnableIpn, storeScope, false); else if (storeScope > 0) - _settingService.DeleteSetting(payGatePaymentSettings, x => x.EnableIpn, storeScope); - - if (model.UseSSL_OverrideForStore || storeScope == 0) + _settingService.SaveSetting(payGatePaymentSettings, x => x.EnableIpn, storeScope); + + if (model.UseSSL_OverrideForStore || storeScope == 0) _settingService.SaveSetting(payGatePaymentSettings, x => x.UseSSL, storeScope, false); else if (storeScope > 0) _settingService.SaveSetting(payGatePaymentSettings, x => x.UseSSL, storeScope); - //now clear settings cache _settingService.ClearCache(); - SuccessNotification(_localizationService.GetResource("Admin.Plugins.Saved")); + _notificationService.SuccessNotification(_localizationService.GetResource("Admin.Plugins.Saved")); return Configure(); } diff --git a/Nop.Plugin.Payments.PayGate/Models/ConfigurationModel.cs b/Nop.Plugin.Payments.PayGate/Models/ConfigurationModel.cs old mode 100755 new mode 100644 diff --git a/Nop.Plugin.Payments.PayGate/Nop.Plugin.Payments.PayGate.csproj b/Nop.Plugin.Payments.PayGate/Nop.Plugin.Payments.PayGate.csproj index 57c7fe8..bf1134b 100755 --- a/Nop.Plugin.Payments.PayGate/Nop.Plugin.Payments.PayGate.csproj +++ b/Nop.Plugin.Payments.PayGate/Nop.Plugin.Payments.PayGate.csproj @@ -1,6 +1,6 @@  - netcoreapp2.1 + netcoreapp2.2 Copyright © PayGate (Pty) Ltd PayGate (Pty) Ltd App Inlet (Pty) Ltd diff --git a/Nop.Plugin.Payments.PayGate/PayGatePaymentProcessor.cs b/Nop.Plugin.Payments.PayGate/PayGatePaymentProcessor.cs old mode 100755 new mode 100644 index 714a8d7..64c24fb --- a/Nop.Plugin.Payments.PayGate/PayGatePaymentProcessor.cs +++ b/Nop.Plugin.Payments.PayGate/PayGatePaymentProcessor.cs @@ -14,7 +14,7 @@ using Nop.Core.Domain.Directory; using Nop.Core.Domain.Orders; using Nop.Core.Domain.Payments; -using Nop.Core.Plugins; +using Nop.Services.Plugins; using Nop.Plugin.Payments.PayGate.Controllers; using Nop.Services.Configuration; using Nop.Services.Directory; @@ -310,6 +310,8 @@ public override void Install() UseSandbox = true, PayGateID = "10011072130", EncryptionKey = "secret", + UseSSL = false, + EnableIpn = false }; _settingService.SaveSetting(settings); diff --git a/Nop.Plugin.Payments.PayGate/PayGatePaymentSettings.cs b/Nop.Plugin.Payments.PayGate/PayGatePaymentSettings.cs old mode 100755 new mode 100644 diff --git a/Nop.Plugin.Payments.PayGate/plugin.json b/Nop.Plugin.Payments.PayGate/plugin.json index 1e916db..4b3b07a 100755 --- a/Nop.Plugin.Payments.PayGate/plugin.json +++ b/Nop.Plugin.Payments.PayGate/plugin.json @@ -2,8 +2,8 @@ "Group": "Payment methods", "FriendlyName": "PayGate", "SystemName": "Payments.PayGate", - "Version": "4.1.1", - "SupportedVersions": [ "4.10" ], + "Version": "4.2.0", + "SupportedVersions": [ "4.20" ], "Author": "App Inlet (Pty) Ltd", "DisplayOrder": 1, "FileName": "Nop.Plugin.Payments.PayGate.dll", From b2b3cebb01d963dd53a2b28864e3bf520232caf1 Mon Sep 17 00:00:00 2001 From: Bruce Atkinson Date: Mon, 2 Sep 2019 10:07:18 +0200 Subject: [PATCH 2/2] Update readme for 4.2.0 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bca0561..3979633 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # PayWeb_NopCommerce_4 -## DPO PayGate PayWeb3 NopCommerce plugin v4.1.1 for NopCommerce v4.10 +## DPO PayGate PayWeb3 NopCommerce plugin v4.2.0 for NopCommerce v4.20 This is the DPO PayGate PayWeb3 plugin for NopCommerce. Please feel free to contact the DPO PayGate support team at support@paygate.co.za should you require any assistance. ## Installation [![How To Setup DPO | PayGate PayWeb for NopCommerce 4](https://www.appinlet.com/wp-content/uploads/2018/09/NopCommerce-4-Integration.jpg)](http://www.youtube.com/watch?v=RfBpKRJi9HA "How To Setup DPO | PayGate PayWeb for NopCommerce 4") -Please navigate to the [releases page](https://github.com/PayGate/PayWeb_NopCommerce_4/releases), download the latest release (v4.1.1) and unzip. You will them be able to follow the integration guide PDF which is included in the zip. +Please navigate to the [releases page](https://github.com/PayGate/PayWeb_NopCommerce_4/releases), download the latest release (v4.2.0) and unzip. You will them be able to follow the integration guide PDF which is included in the zip. ## Collaboration