Page 64 of 75 FirstFirst ... 1454626364656674 ... LastLast
Results 631 to 640 of 750
  1. #631
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    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
    Mark
    Hare Do

  2. #632
    Join Date
    Jan 2010
    Posts
    48
    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
    212
    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

  5. #635
    Join Date
    Nov 2006
    Posts
    108
    Plugin Contributions
    0

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

    Hello,
    I still got the following error from time to time:


    Error Dump: stdClass Object
    (
    [errors] => Array
    (
    [0] => stdClass Object
    (
    [code] => VALUE_EMPTY
    [detail] => Field must not be blank
    [field] => source_id
    [category] => INVALID_REQUEST_ERROR
    )


    [1] => stdClass Object
    (
    [code] => VALUE_EMPTY
    [detail] => Field must not be blank
    [field] => idempotency_key
    [category] => INVALID_REQUEST_ERROR
    )


    [2] => stdClass Object
    (
    [code] => MISSING_REQUIRED_PARAMETER
    [detail] => Field must be set
    [field] => amount_money
    [category] => INVALID_REQUEST_ERROR
    )
    )
    )

    It happens when a customer wants to check out. I can not find any pattern, why this error occurs. If I charge the customer manually from the Square website, the transaction is succesful.I use Zencart 1.5.6c, Square module 1.5, Square API from 2020-05-28.The Square API is the one which is recommended in Square module 1.5. It is currently 18 versions behind. Does it make sense to upgrade to the newest Square API?
    Last edited by todoonada; 5 Nov 2021 at 02:58 AM.

  6. #636
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

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

    Hello.

    There's what seems to be an unusual occurrence happening with this module. ZC version 1.5.6c, Square version 1.5.

    Customers are complaining they cannot checkout, that the credit card module is "stuck on displaying an error" whenever wrong data is entered.

    We tested entering an invalid CC number and it displays an error message, as it should. We then entered a valid CC number, all data correctly, but the previous error message continues to display not letting us move forward with checkout. The only way to remove the error message is to go back to checkout_shipping, go back again to checkout_payment and re-enter all the payment info, or refresh the checkout_payment page, not ideal.

    I'm assuming this could be solved by upgrading the Production API version on Square, but before I kill the store, I would like to ask which version of the Production API on Square I should upgrade to, based on the ZC/Square versions I currently have installed, and if I should also change my webhook endpoints to use this API version.

    Thank you for the help!

  7. #637
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

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

    Quote Originally Posted by mvstudio View Post
    Hello.

    There's what seems to be an unusual occurrence happening with this module. ZC version 1.5.6c, Square version 1.5.

    Customers are complaining they cannot checkout, that the credit card module is "stuck on displaying an error" whenever wrong data is entered.

    We tested entering an invalid CC number and it displays an error message, as it should. We then entered a valid CC number, all data correctly, but the previous error message continues to display not letting us move forward with checkout. The only way to remove the error message is to go back to checkout_shipping, go back again to checkout_payment and re-enter all the payment info, or refresh the checkout_payment page, not ideal.

    I'm assuming this could be solved by upgrading the Production API version on Square, but before I kill the store, I would like to ask which version of the Production API on Square I should upgrade to, based on the ZC/Square versions I currently have installed, and if I should also change my webhook endpoints to use this API version.

    Thank you for the help!
    I went ahead and tested my theory and upgraded the Production API version to the latest one. I entered again the wrong CC data, error message displayed. Corrected the CC data, and error message continues on and is not letting me proceed with checkout.

    Am I correct in assuming something else is going on? Has anyone reported this before? Thank you.

  8. #638
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

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

    Quote Originally Posted by mvstudio View Post
    Hello.

    There's what seems to be an unusual occurrence happening with this module. ZC version 1.5.6c, Square version 1.5.

    Customers are complaining they cannot checkout, that the credit card module is "stuck on displaying an error" whenever wrong data is entered.

    We tested entering an invalid CC number and it displays an error message, as it should. We then entered a valid CC number, all data correctly, but the previous error message continues to display not letting us move forward with checkout. The only way to remove the error message is to go back to checkout_shipping, go back again to checkout_payment and re-enter all the payment info, or refresh the checkout_payment page, not ideal.

    I'm assuming this could be solved by upgrading the Production API version on Square, but before I kill the store, I would like to ask which version of the Production API on Square I should upgrade to, based on the ZC/Square versions I currently have installed, and if I should also change my webhook endpoints to use this API version.

    Thank you for the help!
    I have corrected this by upgrading 1.56c client stores to the newest version of the Zen Square plugin and the newest API version in production with no further issues.

    Be certain the old files are off the server as described in the install for the new Square plugin :)

    [backup your site files and the db prior to making these changes just in case]
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

  9. #639
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

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

    Quote Originally Posted by twitchtoo View Post
    I have corrected this by upgrading 1.56c client stores to the newest version of the Zen Square plugin and the newest API version in production with no further issues.

    Be certain the old files are off the server as described in the install for the new Square plugin :)

    [backup your site files and the db prior to making these changes just in case]
    Hi! Thanks for the reply.
    I do have the latest version of the plugin and just today upgraded to the latest Square API, and it seems it didn't do much.
    I'm afraid at this moment I cannot upgrade to the latest ZC version My store is heavily modified and I wouldn't be able to complete the upgrade in time for the holiday sales.
    Is there anything I could patch for the time being to prevent this issue at least until the store is closed and I can upgrade everything?
    Thanks so much!

  10. #640
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

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

    First I would remove the module and check the db it has been removed properly Admin > Modules > Payment > Square... then remove the files and make sure they are not on the server... then reinstall everything.

    Test the install.

    Get errors again...
    I would have to look at what is going wrong to see if there was a non generic tracer in the error log perhaps. Or force an error to see if there is an old reference on the server. Next I would try an older API version just in case the 'newest' one had a bug. And then start checking if the server version and PHP version mismatch along with the older PHP bridge these servers use is faulty.

    You could post the error log get more eyes on it or hire that Twitchtoo guy to have a look - coffee is always a good place to start!
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

 

 
Page 64 of 75 FirstFirst ... 1454626364656674 ... LastLast

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