Would be glad to try and help you out a bit since I have just finished my payment plugin.
Could you elaborate a bit on the flow of this verification ? Do I understand correctly that you make payment request without customer redirection ? Do you need to get the IP in your own controller which is being called in response ?
Looking forward to hear from you!
It is a simple payment plugin in which the user is redirected to payment gateway with required parameters and the payment gateway returns to my controller with specific response.
So now I need to know the IP address of this response in my controller.
Hope this makes sense.
var IP = Request.ServerVariables["REMOTE_ADDR"];
Please see http://www.geekpedia.com/KB32_How-do-I-get-the-visitors-IP-address.html this page. So you should try the following:
1. Open \src\Presentation\Nop.Web\Web.config
2. Add "ForwardedHTTPheader" app setting with "REMOTE_ADDR" value.
Or you can simply replace "X-FORWARDED-FOR" with "REMOTE_ADDR" in the "GetCurrentIpAddress" method of \Libraries\Nop.Core\WebHelper.cs file
So basically in PostProcess you do redirect user and then for your payment gateway you set return URL to custom URL of your plugin ?
If so then when external payment gateway hots back your controller you should be able to get that IP address