Skip to content

Commit

Permalink
Merge pull request #4 from RBAtkins0n/master
Browse files Browse the repository at this point in the history
= 4.2.0 = * Release for nopCommerce 4.2
  • Loading branch information
appinlet authored Sep 2, 2019
2 parents a89e7c7 + b2b3ceb commit 42a345e
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
21 changes: 12 additions & 9 deletions Nop.Plugin.Payments.PayGate/Controllers/PaymentPayGateController.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
Expand All @@ -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;
Expand All @@ -60,6 +63,7 @@ public PaymentPayGateController(IWorkContext workContext,
this._permissionService = permissionService;
this._payGatePaymentSettings = payGatePaymentSettings;
this._logger = logger;
this._notificationService = notificationService;
}

#endregion
Expand Down Expand Up @@ -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();
}
Expand Down
Empty file modified Nop.Plugin.Payments.PayGate/Models/ConfigurationModel.cs
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<Copyright>Copyright © PayGate (Pty) Ltd</Copyright>
<Company>PayGate (Pty) Ltd</Company>
<Authors>App Inlet (Pty) Ltd</Authors>
Expand Down
4 changes: 3 additions & 1 deletion Nop.Plugin.Payments.PayGate/PayGatePaymentProcessor.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -310,6 +310,8 @@ public override void Install()
UseSandbox = true,
PayGateID = "10011072130",
EncryptionKey = "secret",
UseSSL = false,
EnableIpn = false
};
_settingService.SaveSetting(settings);

Expand Down
Empty file modified Nop.Plugin.Payments.PayGate/PayGatePaymentSettings.cs
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions Nop.Plugin.Payments.PayGate/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 42a345e

Please sign in to comment.