Announcement

Collapse
No announcement yet.

How to log the IP address when an order is placed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by Owen Drumm
    I can't find any of this in ActinicOrder on 8.5.0
    Bruce said
    v8.5.1 has some changes to the scripts to accommodate new features. One of the changes was to move the sub routine you are looking for from OrderScript.pl to ActinicOrder.pm .
    this could mean that in 8.5.0, it's still in the OrderScript.pl?? (stab in the dark here, I don't know..I did it in 8.5.1)
    Tracey

    Comment


      #32
      OK, I'll have a look. One of the reasons for this is that I keep on getting orders from some C##k in Ghana where he puts his address as Ghana but because we don't ship there he puts the UK instead. What a p###k.

      I guess I will just have to bar his ip address instead.
      Fitness for life!www.fitness-focus.co.uk


      DIFN - Doing nothing is not an option

      The Supplement Warehouse - Bodybuilding & Fitness Supplements

      Comment


        #33
        Thank you!

        I use now your lines into my scripts and they are going perfectly! You are a Genius!

        Again, thanks a lot,
        Regards
        Henri


        Originally posted by berniejones
        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
        Henri Weigel
        A3W-Resources

        Comment


          #34
          Thank-you

          I use now your lines into my scripts and they are going perfectly! You are a Genius!

          Again, thanks a lot,
          Regards
          Henri
          Henri Weigel
          A3W-Resources

          Comment

          Working...
          X