Page 64 of 64 FirstFirst ... 1454626364
Results 631 to 634 of 634
  1. #631
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,147
    Plugin Contributions
    0

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    zen cart 157c
    PHP: 7.3.30

    Cron Error in Cpanel

    Automatic Token Refreshing via cron

    This is optional. For low-traffic stores, this is recommended.
    In the initial setup, you clicked that "green button" to activate the module by setting what's called a Refresh Token. This token will expire in 45 days if no transactions are made. (30 days expiration, plus 15 days grace period.) After the 30 days you will see the green "Get Access Token" button again in your store Admin, and will need to click it to reactivate the module as you did during initial setup.
    With regular transaction activity the token will refresh itself, but this can come at the expense of a brief delay for random customers. To avoid the possibility of such delays, or expiration due to inactivity, we recommend that you set up a "cron job" on your server to automatically handle token refreshes without interfering with customer checkout activity.
    To set up the cron job, go to the cron settings in your website hosting company's control panel, and create a new task to run every 3 days at 1am. The command for the task will be:
    php /home/user/your/path/to/wherever/is/square_handler.php
    Again, if your token expires, Square will no longer show up during checkout for your customers. But you can fix it manually by clicking the green button to "login and authorize your account" as described in the Configuration section above.
    When applying the php code to run the cron below.
    Code:
    php /home/xxxxxxxxxxx/public_html/square_handler.php
    I receive the following log file
    Code:
    PHP Fatal error:  Uncaught Error: Class 'square' not found in /home/xxxxxxxxxxxxx/public_html/square_handler.php:21
    Stack trace:
    #0 {main}
      thrown in /home/xxxxxxxxxxxx/public_html/square_handler.php on line 21

  2. #632
    Join Date
    Jan 2010
    Posts
    36
    Plugin Contributions
    0

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    This sounds like what I encountered a couple years ago. My "fix" was to add a few lines to square_handler.php:
    Code:
    <?php
    /**
     * Callback module for Square payment module
     * Updated 2019-03-15
     */
    header('Access-Control-Allow-Origin: *');
    
    $mode = 'cli';
    if (!empty($_GET['code'])) {
        $mode = 'web';
    }
    $verbose = false;
    if (!isset($_SERVER['REQUEST_URI'])) $_SERVER['REQUEST_URI'] = __FILE__;    // to avoid PHP notice for CLI
    if (!isset($_SERVER['SCRIPT_NAME'])) $_SERVER['SCRIPT_NAME'] = __FILE__;    // to avoid PHP notice for CLI
    require 'includes/application_top.php';
    if (empty($PHP_SELF)) $PHP_SELF = __FILE__; // ensure that $PHP_SELF is not empty
    require DIR_WS_CLASSES . 'payment.php';
    if ($mode === 'web' && (empty($_GET['code']) || empty($_GET['state']))) {
        if ($verbose) echo 'INVALID PARAMS';
        http_response_code(400);
        exit(1);
    }
    $module = new payment('square');
    $square = new square;
    if ($mode === 'web') {
        if ($verbose) error_log('SQUARE TOKEN REQUEST - auth code for exchange: ' . $_GET['code'] . "\n\n" . print_r($_GET, true));
        $square->exchangeForToken($_GET['code']);
        exit(0);
    }
    if ($mode === 'cli') {
        if (!defined('MODULE_PAYMENT_SQUARE_STATUS') || MODULE_PAYMENT_SQUARE_STATUS !== 'True') {
            if ($verbose) echo 'MODULE DISABLED';
            http_response_code(417);
            exit(1);
        }
        $is_browser = (isset($_SERVER['HTTP_HOST']) || PHP_SAPI !== 'cli');
        $result = $square->token_refresh_check();
        if ($verbose) echo $result;
        if ($result === 'failure') {
            if (!$is_browser) echo 'Square Token Refresh Failure. See logs.';
            http_response_code(417);
            exit(1);
        }
    }
    exit(0);
    I found that for the host I was using that $PHP_SELF was empty when the script was run via cron and prevented the proper setup of the necessary classes, tripping the failure of creating an instance of the square class. I also squashed a couple PHP notices when patching the bug.

  3. #633
    Join Date
    Dec 2008
    Location
    USA, North East
    Posts
    191
    Plugin Contributions
    0

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    Hello Zen Cart-ians, which is what i suppose you'd call people who live in a state called Zen Cart? or would it be Zen Cart-ites?

    So I installed Square and all is well until one our site sites gets a notice that selling CBD is not yet allowed, fill out this 20 page application to sell it, include 6 months of bank statements and by the way, we are stopping all money to your bank until resolved. CBD is allowed federally. Thanks to the 2018 Farm Bill (aka the Agricultural Improvement Act of 2018), CBD products are federally legal to produce, purchase, and use if they meet certain conditions. To be federally legal, CBD must be hemp-derived and contain no more than 0.3% THC. The products i sell have 0.0% THC.

    Selling CBD and selling CBD with THC are two different worlds. CBD is legal and useful and been selling it for years! But Square now is the problem as they are too big to look into details and just slap that big business protocol without any closer inspection. In other words, they don't know if we sell it with THC and will not investigate. Authorize.net which used to be a straight forward basic information application now requires nearly every single personal identifiable information you have including license, SS, Cell, etc. Fine but then the current 2021 application declares the right to Audit your books at will and to forfeit any future possible litigation against the company should they make a mistake. It's just wow! If they make the mistake, you sign away litigation. It's not enforceable in any court but it's there and you sign it so...who knows.

    This is SECTION 8.2 of Authorize sign on contract in case someone doesn't think I'm accurate. Audit. During the term of this Agreement and for two (2) years thereafter, CyberSource shall have the right to examine Merchant’s records, books, systems, controls, processes and procedures (“Records”) for the purpose of verifying Merchant’s compliance with the terms and conditions of this Agreement (“Audit”). Merchant shall provide to the auditors and personnel of CyberSource (“Auditors”) reasonable access to Records and shall cooperate and provide to such Auditors, in a timely manner, all such assistance as they may reasonably require in connection with any such Audit. Except in the event that CyberSource has reasonable basis to believe that Merchant is in violation of any Rules or laws, or in breach of any warranties, CyberSource will provide Merchant no less than five (5) days written notice prior to the date of an Audit, the Audit will be conducted during Merchant’s normal business hours, and Audits shall occur no more than twice in any calendar year.

    My question is, is there an exhaustive list of processors that are set up with Zen Cart other than the ones in the plug in section? Square doesn't allow things like CBD or let's say you make art out of used bullets. If the bullets are real, they'll shut down the account because they cannot determine if the bullets are live ammo. Even though you state it's dead ammo and clean and used in this art piece, doesn't cut it. If it says made out of spent dead ammo... it's a shut down. It's all big business iron clad type legalities. Small business would work a little and look! Big business it's just protocol. Authorize.net is so big and now a visa owned company, they pretty much created a one sided contract. All your personal information is shared among it's family of providers as needed to perform their job which means, all that personal information is going to be out there big time. Like to keep it in the USA for the sake of data protection. So back to the question: other than what is listed in the plug in section, are there more credit card processors that are set up to work in Zen or might there be yet another solution? I liked the way it was years ago, the numbers came over split and we just keyed them in. thanks. :)

  4. #634
    Join Date
    Jul 2017
    Location
    Bulgaria
    Posts
    1
    Plugin Contributions
    0

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    Hi There,
    Can you tell me if this is compatible with a multi designer zencart store.
    Jenny

 

 
Page 64 of 64 FirstFirst ... 1454626364

Similar Threads

  1. Bambora/Beanstream Payment Module Support Thread
    By swguy in forum Addon Payment Modules
    Replies: 127
    Last Post: 26 Mar 2021, 04:13 PM
  2. v154 Support Thread: AddToAny for Zen Cart (The Universal Sharing Platform)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 8 Apr 2019, 02:39 PM
  3. WordPress® for Zen Cart® (wp4zen) [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 107
    Last Post: 13 Jan 2019, 12:32 PM
  4. Layaway Payment Module Support Thread
    By Danielle in forum Addon Payment Modules
    Replies: 0
    Last Post: 21 Nov 2006, 06:43 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