Re: Square WebPay support thread.
Yikes.
[12-Jul-2022 17:30:21 America/Chicago] PHP Fatal error: Uncaught TypeError: Argument 1 passed to square_webPay::saveAccessToken() must be an instance of Square\Models\ObtainTokenResponse, array given, called in /home/ccs/public_html/zen/includes/modules/payment/square_webPay.php on line 732 and defined in /home/ccs/public_html/zen/includes/modules/payment/square_webPay.php:644
Can't even see Webpay in the sidebar.
Re: Square WebPay support thread.
Resolution:
Edit URL in browser address bar to end in
action=delete
Then you can remove the module and add again.
Re: Square WebPay support thread.
I think the root cause was that I said disable the old OAuth secret right away (instead of waiting 24 hours as is done by default). So it may be best not to do that.
Re: Square WebPay support thread.
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.
Re: Square WebPay support thread.
Quote:
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!
Re: Square WebPay support thread.
for those of you who have helped me with debugging problems, i want to express my thanks.
for those of you who attempted to brow beat me into submission, i say bugger off!
if you do not know which group you are in, feel free to DM me.
for those of you still having problems with OPC and square_webPay, i want to refer you to this post, and specifically this github issue which will be corrected in the soon to be released version of OPC.
no change is necessary for square_webPay to play nice with OPC.
individuals who i privately contacted about testing, please change this file:
https://github.com/lat9/one_page_che...heckout_one.js
and it's minimized version:
https://github.com/lat9/one_page_che...out_one.min.js
to the released version; once released.
while your testing confirmed all of my debugging, keeping everyone on the released version of OPC is better for support in the long run.
other cleanup of square_webPay (including better handling of the OAuth handshake) may happen in the future. development does not happen without support.
best.
Re: Square WebPay support thread.
> if you do not know which group you are in, feel free to DM me.
So old school. Clearly you should build a Wiki or something so an asynchronous determination can be made.
Re: Square WebPay support thread.
I am aware of which group I am in...
Re: Square WebPay support thread.
Yeah but, I'm in all three. :cheers:
Re: Square WebPay support thread.
1.5.7d PHP 7.4.3
Site is running the latest Github versions of WebPay and OPC.
Single files previously changed in OPC were overwritten as instructed.
This has shown up three times during a time span when 47 successful WebPay captures were made.
Code:
[18-Jul-2022 10:22:43 America/New_York] PHP Notice: missing token result: check if card button is disabled on dev console using: document.getElementById('card-button'); else look for javascript error in console. in /includes/modules/payment/square_webPay.php on line 239
Still cannot duplicate and all transactions I try show no console errors.