@proseLA - I'm adding this to the documentation unless you have objections:
Run a cron job every 3 days with the command
/usr/bin/wget https://YOURSTORE/squareWebPay_handler.php
Printable View
@proseLA - I'm adding this to the documentation unless you have objections:
Run a cron job every 3 days with the command
/usr/bin/wget https://YOURSTORE/squareWebPay_handler.php
@carlwhat thanks.
@dbltoe thanks for that - I'll advise using one of these two methods.
Having another go at installing this version. I notice this warning was in an earlier post but as it wasn't the main issue it never got addressed.
I can add quotes to the code to get rid of the warning but I'm not convinced this is the solution as nobody else seems to have the issue.PHP Code:
[06-Sep-2022 16:00:53 Europe/London] Request URI: /...../admin/index.php?cmd=orders&page=1&oID=31216&action=edit, IP address: xxx.xxx.xxx.xxx
#1 square_webPay->__construct() called at [/admin/orders.php:521]
#2 require(/admin/orders.php) called at [/admin/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE - assumed 'MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE' (this will throw an Error in a future version of PHP) in /includes/modules/payment/square_webPay.php on line 106.
[06-Sep-2022 16:00:53 Europe/London] Request URI: /..../admin/index.php?cmd=orders&page=1&oID=31216&action=edit, IP address: xxx.xxx.xxx.xxx
#1 square_webPay->__construct() called at [/admin/orders.php:521]
#2 require(/admin/orders.php) called at [/admin/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN - assumed 'MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN' (this will throw an Error in a future version of PHP) in /includes/modules/payment/square_webPay.php on line 111.
I am using V1.0.1 from the downloads on Zen V1.5.7d and PHP 7.4
Any pointers please?
hey brent,
that has been fixed, but i have not uploaded it for a new version. you should replace lines 105-118 with the following code:
there's actually 4 new lines in there and 2 changed lines.PHP Code:
$environment = Environment::PRODUCTION;
if (defined('MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE') && MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE === 'Sandbox') {
$environment = Environment::SANDBOX;
}
$this->token= '';
if (defined('MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN')) {
$this->token = MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN;
}
$this->client = new SquareClient([
'accessToken' => $this->token,
'environment' => $environment,
]);
$this->oauthClient = new SquareClient([
'environment' => $environment,
]);
if (IS_ADMIN_FLAG === true) {
let me know if you run into any other problems.
best.
Thank you kind sir! That did the trick :smile:
Since switching I've had a number of customers reporting their transaction is declined but I don't get any error logs my end. I am getting orders through so it is card type or issuing bank dependant. I think it may be card type as I had one user who could not get their credit card to work but as soon as they tried debit card it went through.
I've now enabled logging on success and failure but don't think this will help me troubleshoot. Also I don't think there is a way to differentiate between credit and debit card in the Square portal so I could investigate that theory?
Square should have logs on their side that will help you troubleshoot this.