Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Feb 2016
    Location
    Canada
    Posts
    171
    Plugin Contributions
    0

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    I am using Zen Cart 1.5.5e the instructions included in the instructions of Fraudlabs Pro Version: 1.0.8 to modify admin/orders.php indicate to
    Search for:
    <div class="row noprint">
    <div class="formArea">
    <?php echo zen_draw_form('statusUpdate', FILENAME_ORDERS, zen_get_all_get_params(['action']) . 'action=update_order', 'post', 'class="form-horizontal"', true); ?>

    and replace with:

    <?php include(DIR_WS_MODULES . 'fraudlabspro/summary.php'); ?>
    <div class="row noprint">
    <div class="formArea">

    but my file shows:

    <!-- BEGIN TY TRACKER 3 - DISPLAY TRACKING ID IN COMMENTS TABLE ------------------------------->
    <td class="dataTableHeadingContent smallText" valign="top" width="23%"><strong><?php echo TABLE_HEADING_TRACKING_ID; ?></strong></td>
    <!-- END TY TRACKER 3 - DISPLAY TRACKING ID IN COMMENTS TABLE ------------------------------------------------------------>
    <!-- Begin Ty Package Tracker Modification (Minor formatting changes) //-->
    <td class="dataTableHeadingContent smallText" valign="top" width="40%"><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td>
    <!-- End Ty Package Tracker Modification (Minor formatting changes) //-->

    not sure what to replace

  2. #12
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    623
    Plugin Contributions
    7

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    Suggested change for anyone running this on PHP 8.


    1. Open /admin/includes/modules/fraudlabspro/summary.php
    2. Delete the following line:
      PHP Code:
      $fraudlabspro_enabled $db->Execute('select configuration_value FROM ' TABLE_CONFIGURATION " WHERE configuration_key = 'FRAUDLABSPRO_ENABLED'"); 
    3. Find the following line (should be the next line):
      PHP Code:
      if ($fraudlabspro_enabled == 'true') { 
      and change it to:
      PHP Code:
      if (FRAUDLABSPRO_ENABLED == 'true') { 


    Trying to pull this value using the $db-> results in an error (using ->Execute seems to generate the result as a MySQL Result field that cannot be assigned or read like a string). My fix to this? Use the raw DEFINE that is generated from all Configuration Keys in the database instead.

    Hope this helps.

  3. #13
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    623
    Plugin Contributions
    7

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    Another bug fix. (Might create an update at this point...)

    Open /admin/include/modules/fraudlabspro/summary.php


    Change line 187 (or look for this block) to a </div>.
    PHP Code:
                echo '  <div class="form-group text-right">';
                echo 
    '    <button id="btn-approve" class="btn btn-primary">Approve</button>';
                echo 
    '    <button id="btn-reject" class="btn btn-primary">Reject</button>';
                echo 
    '    <button id="btn-blacklist" class="btn btn-primary">Blacklist</button>';
                echo 
    '  <div>';
                echo 
    '</form>'?> 
    and change that <div> to a </div> at the end.
    Last edited by retched; 30 Nov 2023 at 06:53 AM.

  4. #14
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    623
    Plugin Contributions
    7

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    Quote Originally Posted by retched View Post
    Another bug fix. (Might create an update at this point...)

    Open /admin/include/modules/fraudlabspro/summary.php


    Change line 187 (or look for this block) to a </div>.
    PHP Code:
                echo '  <div class="form-group text-right">';
                echo 
    '    <button id="btn-approve" class="btn btn-primary">Approve</button>';
                echo 
    '    <button id="btn-reject" class="btn btn-primary">Reject</button>';
                echo 
    '    <button id="btn-blacklist" class="btn btn-primary">Blacklist</button>';
                echo 
    '  <div>';
                echo 
    '</form>'?> 
    and change that <div> to a </div> at the end.
    Submitted this change as version 1.4.1 to the Plugin database

  5. #15
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,178
    Plugin Contributions
    124

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    Rather than

    if (FRAUDLABSPRO_ENABLED == 'true') {


    I would suggest

    if (defined('FRAUDLABSPRO_ENABLED') && FRAUDLABSPRO_ENABLED == 'true') {

    for PHP 8 use.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #16
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    623
    Plugin Contributions
    7

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    Quote Originally Posted by swguy View Post
    Rather than

    if (FRAUDLABSPRO_ENABLED == 'true') {


    I would suggest

    if (defined('FRAUDLABSPRO_ENABLED') && FRAUDLABSPRO_ENABLED == 'true') {

    for PHP 8 use.
    Noted that change and another bug I just found with the email domain variable too. I'm also working on a callback script but I don't want to submit it until I'm sure it works. Also working on a "fixed" (read: prettified) amount field to be properly format and not just a raw pull from the database complete with the float. (Started a thread in "Contribution guidelines" about it if anyone wants to help.)

  7. #17
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,182
    Plugin Contributions
    90

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    Even better, IMO:

    Code:
    if (defined('FRAUDLABSPRO_ENABLED') && FRAUDLABSPRO_ENABLED === 'true') {

  8. #18
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    623
    Plugin Contributions
    7

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    Ready with those total changes but I think I have to wait for my other submission to be made before I can submit it.

  9. #19
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    623
    Plugin Contributions
    7

    Default Re: FraudLabs Pro Fraud Prevention (Support Thread)

    Added version 1.5.0 to the Plugin DB (awaiting confirmation and approval).

    Changelog:
    ===
    Added
    - Created ZenCart observer to delete the order details from the Fraudlabs order table when the base orders details are deleted from the ZC database. (NOTE: There is no way to delete a transaction from the Fraudlabs backend once it has been posted to FraudLabs.)
    - Added Agent Javascript (https://www.fraudlabspro.com/developer/javascript) processing. Effectively, each order submitted to the FraudLabsPro API can have a hash of the UserAgent, IP Address, OS version, and device type added to the order. This will avail the opportunity to blacklist devices or detect if the device is a known bad agent. This is optional and must be turned on by visiting the ZenCart configuration and enabling the "Agent Javascript" option by setting it to TRUE.
    - Array-based language defines support (See first point in Changed section.)


    Changed
    - Changed all plain text language to ZC language defines. These files are the array-based files that are found in ZC 1.5.8 and onward, allowing for translation possibility. (Base language included in English.)
    - Changed the layout of FraudlabsPro Summary to match that of the full details found in the FraudLabsPro backend. (Effectively, all parts that make up the response from FraudLabsPro's API can now be found in a tabbed area on the backend. The layout of the table has also been changed. (`TODO:` Move this off from being a hard edit in /admin/orders.php to a separate observer class.)
    - Rearranged the order of the country details so that now it is `order_city, order_region, order_country, order_continent`. If there are any blanks, they will be skipped.
    - Moved the link to the geolocation.com website to a button found next to the IP address listing.
    - The database will now contain `NULL` values. The script will handle `NULL` by displaying `<em>- N/A -</em>` where necessary.
    - All possible values that can be pulled from the ScreenOrder API are now stored in the database.
    - Changed the feedback buttons (APPROVE, REJECT, BLACKLIST) to now only show the necessary button. (ie. An already APPROVE'd order cannot be approved twice.) Note: If you use the FraudLabsPro backend to update the status of the order, currently, this will not be reflected in ZenCart. (A webhook script is being worked on.)
    - Added a flag icon that will be displayed next to the IP location and other country lookups as necessary (provided by the flagcdn.com API). Will only show up if the country field being looked up isn't `NULL`.
    - Break down the errors that could be found and help for fixing them. (99% of the errors of the API will effectively kill the transaction.) If an error is found, a new tab "Error Details" will be available to view.
    - Moved the calling of the order details during the checkout process to be a ZC observer instead. (This way it will survive edits from core file edits.)
    - Made this [change]( to better detect if the module is enabled.


    Fixed
    - Fixed an unclosed <div> found in /admin/includes/modules/fraudlabspro/summary.php that was causing some bad displays.


    ===
    If you're updating to 1.5.0, there is an additional SQL file that needs to be run called alter_flp_orders.sql. That should be ran against your orders_fraudlabspro table. If you don't care to keep your Fraudlabs order history, you can drop that table and run flp_orders.sql. Keep in mind that this doesn't remove them Fraudlabs' databases.

    Additionally take care that you delete the folder /includes/modules/fraudlabspro and remove the following line from /includes/modules/pages/checkout_process/header.php: (they are no longer needed as the observer class will take over as needed)

    PHP Code:
    require(DIR_WS_MODULES 'fraudlabspro/fraudlabspro.php'); 
    Also missing from the notes is the more prevalent usage of the "N/A" descriptor. This is due to some fields not being returned from Fraudlabs API unless you have a paid plan with them. I left them in the database and output but overall these do NOT cripple the code in anyway shape or form.

    If you plan on using Agent Javascript and maintain a privacy policy list and cookies statement, you should link to the Fraudlabs Pro Privacy Policy as well as note the cookie 'flp_checksum' in your cookies declaration statement. Agent Javascript is an optional part of the module, you do not need to enable it and by default it is turned off.

    The next version (2.0.0) made by me will likely be made into an encapsulated plugin. (I just have to figure out how to add the contents of summary.php to work with the orders.php.)

    If there are any errors, please discuss them here. I will reply when I am available to do so.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 Questions about FraudLabs Pro Credit Card Fraud Prevention mod
    By ShopVille in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 20 Sep 2017, 05:02 PM
  2. Cambridge Pro Template Support Thread
    By picaflor-azul in forum Addon Templates
    Replies: 179
    Last Post: 28 Mar 2016, 04:56 PM
  3. Azienda Pro Free Template - Support Thread
    By brandonturpin in forum Addon Templates
    Replies: 38
    Last Post: 28 Feb 2015, 06:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR