Awesome. Thank you very much.
I guess I'll just start over and upgrade PHP to 7.2 while I am at it.
Awesome. Thank you very much.
I guess I'll just start over and upgrade PHP to 7.2 while I am at it.
PHP 7.2 was a bad idea, reverting to 7.1
Zen-Cart 1.5.5e, PHP 5.4.44, MySQL 5.6.15, Square Payment Module 0.90.
I have the files placed correctly, with square_handler.php in the domain/shop folder and the rest in domain/shop/includes. Application ID and Application Secret are entered correctly from the SquareUp.com app I created. I am seeing the red (Access Token needed). When I click on the green Click here I get the prompt and I enter the login and password for Square which then closes the tab and returns me to my Zen-Cart admin tab. Where can I find a log of the error?
Aha, a clue perhaps... When I get sent back to Payment Modules I see:
ERROR: module not loaded due to missing language file: C:/Web Files/localuser/CHCG/Shop/includes/languages/english/modules/payment/square_handler.php
And that folder contains a file called square.php, not square_handler.php. Do I need to rename? The setting for the location for domain/shop/square_handler.php is correct on Square, so it doesn't make sense for it to be looking in the languages folders.
Last edited by billsey5; 29 Apr 2018 at 01:00 AM.
No one has any ideas? I'm kind of stuck...
Can you verify that this is what you are seeing?ERROR: module not loaded due to missing language file: C:/Web Files/localuser/CHCG/Shop/includes/languages/english/modules/payment/square_handler.php
The system should NOT be looking for that file in that location.
Square.php should be the correct file.
Square_handler.php should be in the root of your site.
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
I tried again a few minutes ago and didn't get that message again. I still just get returned without a request to authorize from Square. Where should I look for log files that might shed some light on this?
That would only appear if you put a file named square_handler.php into the /includes/modules/payment directory. The system looks for the module files, and their corresponding matching filename for language file. That error message means you've got a module file present without a matching language file.
And in this situation you should not have a "square_handler.php" file in the /includes/modules/payment directory. It belongs in the root directory of your shop.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Is it possible to upgrade to a more current version of PHP? PHP 5.4 is really old: its last update was Sept 2015.
The normal flow is:
- Click green button
- it takes you to the Square site, asking for login if you're not already logged in. Presents an authorization prompt if not already authorized.
- returns you to your store admin
- If the "Access Token Needed" alert is still showing, press F5 to reload the admin page in your browser.
Is the directory you've been quoting (C:/Web Files/localuser/CHCG/Shop/) a local development PC? Or is it the live production server for your domain?
What browser/s are you doing this Admin / SquareLogin in?
Any logs generated by the module are stored with other error reports in the /logs/ folder as "myDebug-xxxxxxxx.log" filenames.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Let me try to cover everything, I have gotten closer though. The server is live, but not visible to the public yet. I'm using Firefox 59 and have tested with IE and Edge as well.
The cert is a Let's Encrypt cert. It seems like curl has problems with those even though no one else seems to. After using the test script for curl and putting a replacement cacert.pem file in the PHP environment, and upgrading the site to 5.6 the test script was able to run completely.
Once curl would work correctly the green button acted as it should and Square was active on the site.
I now find that I can add things to my cart, go through the checkout process until I get to the confirm my order where after I push the button it waits for a minute or two and then gives me a 500 - internal server error. A refresh of the page gives the warning about resending data the take me back to the payment information page with a "Unable to process payment due to a communications error. You may try again or contact us for assistance." notice.
Let me know where I can look for more info on fixing this.