From 971aa5a03db5286fdc36fb3823912cdeb3d55c40 Mon Sep 17 00:00:00 2001 From: andreymaz Date: Thu, 1 Aug 2013 13:49:36 +0400 Subject: [PATCH] PayPal Direct could cause some issue when testing in sandbox mode on localhost. You could get 10747 error --- src/Plugins/Nop.Plugin.Payments.PayPalDirect/Description.txt | 2 +- .../PayPalDirectPaymentProcessor.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Plugins/Nop.Plugin.Payments.PayPalDirect/Description.txt b/src/Plugins/Nop.Plugin.Payments.PayPalDirect/Description.txt index 67c47377ad2..82f94f900e3 100644 --- a/src/Plugins/Nop.Plugin.Payments.PayPalDirect/Description.txt +++ b/src/Plugins/Nop.Plugin.Payments.PayPalDirect/Description.txt @@ -1,7 +1,7 @@ Group: Payment methods FriendlyName: Credit Card SystemName: Payments.PayPalDirect -Version: 1.18 +Version: 1.19 SupportedVersions: 3.10 Author: nopCommerce team DisplayOrder: 1 diff --git a/src/Plugins/Nop.Plugin.Payments.PayPalDirect/PayPalDirectPaymentProcessor.cs b/src/Plugins/Nop.Plugin.Payments.PayPalDirect/PayPalDirectPaymentProcessor.cs index 64cafb425c2..e7440dcb427 100644 --- a/src/Plugins/Nop.Plugin.Payments.PayPalDirect/PayPalDirectPaymentProcessor.cs +++ b/src/Plugins/Nop.Plugin.Payments.PayPalDirect/PayPalDirectPaymentProcessor.cs @@ -132,6 +132,8 @@ protected ProcessPaymentResult AuthorizeOrSale(ProcessPaymentRequest processPaym var details = new DoDirectPaymentRequestDetailsType(); req.DoDirectPaymentRequest.DoDirectPaymentRequestDetails = details; details.IPAddress = _webHelper.GetCurrentIpAddress(); + if (details.IPAddress == "::1") + details.IPAddress = "127.0.0.1"; if (authorizeOnly) details.PaymentAction = PaymentActionCodeType.Authorization; else