ZC v1.5.5e
Square v0.90
On a low traffic site I have set up a cron job to run every few days so to refresh the Square access token. A recent purchase failed to complete as the token had expired, it must have been more than 45 days between orders. Looking further into the cron which is
I get 'No output generated' if I run the cron from within my hosting control panel (I should have done that when I first set it up). I've checked file permissions - 644 (read for all and write for owner) and owner/group (I'm running the cron as root), there's nothing in the cron logs. Not sure where else to look.Code:php /home/mywebsite/public_html/square_handler.php
Edit,
Thinking about it a bit more, the problem may lie with the way my host runs php cron jobs, I use Virtualmin on a VPS, I'll look into it.
Last edited by simon1066; 24 Jan 2018 at 06:26 PM.
Once you have v0.90 installed (all the files updated), after your token expires you need to re-activate it once, using the normal process of:
Go to the Square module in your Admin->Modules->Payment, click on Square. There you will see a button to authorize a token. Click it: it will take you to the Square site to login there (if not already logged in to Square), and then redirect back to your site.
At this point, if you have v0.91 or newer installed, it will auto-refresh your store's admin page. otherwise you'll need to click Refresh (or F5) to reload the screen. You'll see that the button goes away. At this point your module is re-authorized, and things should work normally. Including the cron script.
.
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.
I'm a little confused about the new inclusion of Square payment module in zc 1.5.5F. In comparing the Square files from a clean copy of ZC 1.5.5F with the module I installed recently for a client on 1.5.5E (I am in the process of upgrading him) I can't tell which version is most current. For example in the file: includes/modules/payment/square.php I see these differences in the header info:
v155E - @version $Id: Author: Chris Brown <[email protected]> New in v1.5.6 $
v155F - @version $Id: Author: Chris Brown <[email protected]> New in v1.5.5f $
This would make it seem like the current version installed on the 155E shop is more current the version included with build 155F
But then there is also this:
v155E - Integrated using SquareConnect PHP SDK v2.5.1
v155F - Integrated using SquareConnect PHP SDK v2.2.1
These lines seem to indicate that the square module included in v155F is newer than the stand alone module I added to my client's shop a few months ago.
Can someone in the know clarify which version is newest and preferred to use?
Thanks!
Just to clarify my question above, I'm trying to determine whether to leave the square module files as is in the client's shop or update them with the 155F upgrade.
Sorry if the above wasn't clear. :)
@earmsby: use the latest version of the Square module, at https://www.zen-cart.com/downloads.php?do=file&id=156
.
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.
I'm coming back to the issue of "Access token needed" disused before in this thread.
Using Zen Cart 1.5.4 - PHP 5.4.23
Tried reinstalling module, reissuing Application Secret and Personal Access Token, to no avail. "Access token needed" doesn't go away.
I can see that "Token set. You may now continue configuring the module" message appears when trying to authorize the account, but nothing happens after.
One detail is that if I edit the module there is no Location Id (appears blank).
What am I doing wrong?
Thank you.
@RobRiv,
Which version of the Square module do you have installed? (It should say in the top of the right-hand-sidebar.)
If the "access token needed" won't go away, even after pressing Refresh in your browser, it suggests that Square isn't able to reach the square_handler.php file on your server in order to set the new access token. This can happen if there is no SSL (https) on your site. It can also happen if you've got URL-rewriting happening that's intercepting the incoming request.
.
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.
Thank you Dr.Byte for your replay.
Square Payments Module 0.90
I believe that Square is able to set the new access token (I can see that "Token set. You may now continue configuring the module" message is displayed) however I don't know if square_handler.php is changed.
Could it be because the site only is SSL secured at log-in/registration (not the full site)?
Thank you again.