I wanted to be able to log the IP address - and ideally the remote hostname to which that address resolves - at the time that any order is placed.
This can help in a number of ways: provide audit information in the event of a fraudulent transaction for example.
For those merchants who are not fully integrated with an online PSP but use a POS terminal to put through a 'cardholder not present' transaction, it would also allow them to build a database of banned IP addresses for example and refuse the order.
Anyway, I've put this solution together. I should say that it hasn't been approved by Actininc support but with any luck something like this will appear in a future release.
Here's what I do:
First, go to Design|text|Web Site (cont) and select the General Information tab.
Check the 'show' box for the entry 'User Definable 3' and set the Prompt value to 'IP address'
Now, in your site directory, edit Act_Order02.html
Find the section that looks like:
NETQUOTEDEL:GENERALPROMPT002
<tr>
<td bgcolor="NETQUOTEVAR:CHECKOUTBG">NETQUOTEVAR:GENERALPROMPT002</td>
<td bgcolor="NETQUOTEVAR:CHECKOUTBG">
<input type="TEXT" name="GENERALUSERDEFINED" size="40" maxlength="255" value="NETQUOTEVAR:GENERALUSERDEFINED">
</td>
</tr>
NETQUOTEDEL:GENERALPROMPT002
and replace it with:
<input type="Hidden" name="GENERALUSERDEFINED" value="NETQUOTEVAR:GENERALUSERDEFINED">
Now edit the perl script file OrderScript.pl
Find the subroutine named DisplayGeneralPhase by searching for 'sub DisplayGeneralPhase'
Towards the end of this, about 23 lines down, find the line:
$::s_VariableTable{$::VARPREFIX.'GENERALUSERDEFINED'} = ACTINIC::EncodeText2($::g_GeneralInfo{'USERDEFINED'});
and replace it with:
my $remote_host = $ENV{'REMOTE_HOST'};
my $remote_addr = $ENV{'REMOTE_ADDR'};
if (($remote_host eq $remote_addr) || ($remote_host eq '')) {
$remote_host = gethostbyaddr(pack('C4', split(/\./, $remote_addr)), 2) || $remote_addr;
}
$::s_VariableTable{$::VARPREFIX.'GENERALUSERDEFINED'} = $remote_addr . '/' . $remote_host;
Save and exit. Update the website through Actinic in the usual way.
After this, when an order is received, the following will be present in the 'Misc' tab:
IP address:
<remote IP address>/<remote hostname>
If anyone tries this please let me know how you get on.
Bernie
This can help in a number of ways: provide audit information in the event of a fraudulent transaction for example.
For those merchants who are not fully integrated with an online PSP but use a POS terminal to put through a 'cardholder not present' transaction, it would also allow them to build a database of banned IP addresses for example and refuse the order.
Anyway, I've put this solution together. I should say that it hasn't been approved by Actininc support but with any luck something like this will appear in a future release.
Here's what I do:
First, go to Design|text|Web Site (cont) and select the General Information tab.
Check the 'show' box for the entry 'User Definable 3' and set the Prompt value to 'IP address'
Now, in your site directory, edit Act_Order02.html
Find the section that looks like:
NETQUOTEDEL:GENERALPROMPT002
<tr>
<td bgcolor="NETQUOTEVAR:CHECKOUTBG">NETQUOTEVAR:GENERALPROMPT002</td>
<td bgcolor="NETQUOTEVAR:CHECKOUTBG">
<input type="TEXT" name="GENERALUSERDEFINED" size="40" maxlength="255" value="NETQUOTEVAR:GENERALUSERDEFINED">
</td>
</tr>
NETQUOTEDEL:GENERALPROMPT002
and replace it with:
<input type="Hidden" name="GENERALUSERDEFINED" value="NETQUOTEVAR:GENERALUSERDEFINED">
Now edit the perl script file OrderScript.pl
Find the subroutine named DisplayGeneralPhase by searching for 'sub DisplayGeneralPhase'
Towards the end of this, about 23 lines down, find the line:
$::s_VariableTable{$::VARPREFIX.'GENERALUSERDEFINED'} = ACTINIC::EncodeText2($::g_GeneralInfo{'USERDEFINED'});
and replace it with:
my $remote_host = $ENV{'REMOTE_HOST'};
my $remote_addr = $ENV{'REMOTE_ADDR'};
if (($remote_host eq $remote_addr) || ($remote_host eq '')) {
$remote_host = gethostbyaddr(pack('C4', split(/\./, $remote_addr)), 2) || $remote_addr;
}
$::s_VariableTable{$::VARPREFIX.'GENERALUSERDEFINED'} = $remote_addr . '/' . $remote_host;
Save and exit. Update the website through Actinic in the usual way.
After this, when an order is received, the following will be present in the 'Misc' tab:
IP address:
<remote IP address>/<remote hostname>
If anyone tries this please let me know how you get on.
Bernie
Comment