Reply
Member
Posts: 8
Registered: ‎09-12-2019
Accepted Solution

API code not transmitting customer's IP address to Auth.net

I just finished implimenting the PHP API code, using the sample code from GitHub. I upgraded from our old CGI/PERL code which has been depricated.

 

Everything is working fine, except one thing: When we charge a credit card the new code transmits our website's IP address instead of the customer's IP address.  This causes our IP velocity filter to flag every transation, since it thinks it's the same person.

 

Does anyone have an idea how I can fix this? Maybe there's something I didn't set right. THANKS!

 


Accepted Solutions
Solution
Accepted by topic author BCamenker
‎09-30-2019 10:27 AM
Member
Posts: 8
Registered: ‎09-12-2019

Re: API code not transmitting customer's IP address to Auth.net

THANK YOU very much for this advice. I searched around and did find the SetCustomerIP() function in one of the classes in the API. It works beautifully! I'm a bit surprised that they don't have that in the sample code if it needs to be set. But I'm fine now!

View solution in original post


All Replies
All Star
Posts: 647
Registered: ‎11-05-2018

Re: API code not transmitting customer's IP address to Auth.net

@BCamenker

Do you pass the IP address in your API call? Need more background into what you are doing.
Member
Posts: 8
Registered: ‎09-12-2019

Re: API code not transmitting customer's IP address to Auth.net

No, there's no place I've found to pass the IP address. (There wasn't in the old code, either.) It seems to just pick it up somewhere. I would prefer to grab it myself and pass it.

All Star
Posts: 647
Registered: ‎11-05-2018

Re: API code not transmitting customer's IP address to Auth.net

@BCamenker

There is a property called customerIP that you can pass it under. It is in the API reference. Your old code may have been for SIM. That would explain how the correct IP address makes it to you. You are probably getting the default 255.... IP address now.
Solution
Accepted by topic author BCamenker
‎09-30-2019 10:27 AM
Member
Posts: 8
Registered: ‎09-12-2019

Re: API code not transmitting customer's IP address to Auth.net

THANK YOU very much for this advice. I searched around and did find the SetCustomerIP() function in one of the classes in the API. It works beautifully! I'm a bit surprised that they don't have that in the sample code if it needs to be set. But I'm fine now!

All Star
Posts: 647
Registered: ‎11-05-2018

Re: API code not transmitting customer's IP address to Auth.net

@BCamenker

And it didn’t cost you $1,000’s to get this done ;)