Jump to content

Customer IP?


Recommended Posts

Hi guys,
Due to selling virtual goods.
There is some risk of fraudlent payments (already experienced one).
Is there any module or tool I can use to detect customer's IP when the purchase made?
Appreciate your time and help.
Thanks.

Share this post


Link to post
Share on other sites

I haven't seen such Module or Mod so far. If you tell me the exact requirements I could develop one for you. I also need to know what version of PS you have installed.

Share this post


Link to post
Share on other sites

The user's IP address is available everywhere, you don't need a module or to pay anyone to develop it for you.

   function getVisitorIP(){
       $ip = $_SERVER["REMOTE_ADDR"];
       $proxy = $_SERVER["HTTP_X_FORWARDED_FOR"];
       if(ereg("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$",$proxy))
               $ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
       return $ip;
   }



Or the simpler way

$ip = $_SERVER["REMOTE_ADDR"];

Share this post


Link to post
Share on other sites

Thanks,
They are probably nice tips. However I am not sure how I can implment them in order to detect IPs for made purchases.
I have noticed some free module on PresoChange with geotool. Can it be useful for this occasion?

Share this post


Link to post
Share on other sites

  • 1 month later...

You can't detect the IP for made purchases unless you save them somewhere when the order is made, you can add the code above in the mail alert module so you will get the IP with every new order notification.

You could also save it in the database, but it will require more work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More