
Originally Posted by
brittainmark
Not an issue, just an uncaught error for information. I think either my serves DNS was down or the square website was down. Log file below.
[13-Jul-2022 00:01:19 UTC] PHP Notice: Exception when calling OAuthApi->obtainToken: Could not resolve host: connect.squareup.com in /includes/modules/payment/square_webPay.php on line 733
[13-Jul-2022 00:01:19 UTC] PHP Fatal error: Uncaught Exception: Error Processing Request: Token renewal failed! in /includes/modules/payment/square_webPay.php:734
Stack trace:
#0 /includes/modules/payment/square_webPay.php(592): square_webPay->renewOAuthToken()
#1 /squareWebPay_handler.php(45): square_webPay->token_refresh_check()
#2 {main}
thrown in /includes/modules/payment/square_webPay.php on line 734
[13-Jul-2022 00:01:19 UTC] Request URI: , IP address: .
--> PHP Fatal error: Uncaught Exception: Error Processing Request: Token renewal failed! in /includes/modules/payment/square_webPay.php:734
Stack trace:
#0 /includes/modules/payment/square_webPay.php(592): square_webPay->renewOAuthToken()
#1 /squareWebPay_handler.php(45): square_webPay->token_refresh_check()
#2 {main}
thrown in /includes/modules/payment/square_webPay.php on line 734.
The token had not expired, I just have a cron job to renew it. I just went into admin>payments>squarewebpay and edited settings and updated with out making any changes. This renewed the access token.
i'm guessing your DNS was down.
perhaps i do not need to throw the exception. current code is:
PHP Code:
} catch (Exception $e) {
trigger_error('Exception when calling OAuthApi->obtainToken: ' . $e->getMessage());
throw new Exception('Error Processing Request: Token renewal failed!', 1);
}
i will think and play around a bit.
thanks for the report!
Bookmarks