Square WebPay - Avoiding Token Expiry

Preventing “OAuth access token has expired”

Manual Prevention

A couple of times a week, go to Admin > Modules > Payment / Square WebPay, click Edit then click Update.

Automated Prevention

Set up a cron job job to run at least twice a week (daily is fine too) that refreshes the token.

Depending on your server configuration, you can do

php PATH_TO_STORE/squareWebPay_handler.php

(where PATH_TO_STORE is the value of DIR_FS_CATALOG from your includes/configure.php file)


/usr/bin/wget https://YOURSTORE/squareWebPay_handler.php

Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified November 13, 2022 by Scott C Wilson (dfdbf4a).