Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
i would suggest these things:
- review the above post. https://tinyurl.com/2probynf
- post a screencast your self documenting the error.
- review this statement from the above mentioned post:
- with regards to the 2 situations you mention above, i have a couple of videos. a GENERIC DECLINE is coming back from square. the SQ-MISSING-TOKEN error is an error from square_webPay as we are not submitting anything to square as we do not have the result from the first step of the process.
- my screencast clearly shows communication from square. not a missing token.
Yep and around in circles we go again lol
Try the same method on the standard checkout and you will clearly see the issue.
I have customers telling me they can't checkout using OPC with Square Webpay because they get the SQ-MISSING-TOKEN error. They don't understand that error as they are not technically minded.
The minute they checkout using the standard zen cart checkout, there isn't an error. It works! Therefore something isn't quite right.
1 Attachment(s)
Re: Square WebPay support thread.
Quote:
Originally Posted by
simon1066
Code:
[06-Jul-2022 17:51:21 Europe/London] 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 /home/my_vps/public_html/includes/modules/payment/square_webPay.php on line 234
ZC v1.5.7d
OPC v2.4.1
PayPal EC
Testing Square WebPay on a live site for the first time. Forgive me for not fully following the previous posts regarding this error/notice but to explain simply (I hope):
Checking out as a guest and using Square WebPay as the payment method I enter the CC info and click the Confirm button, the checkout_one page refreshes showing the SQ-MISSING-TOKEN error message with the above PHP notice in the \logs folder. It makes no difference if I first click the Square radio button or go straight to entering CC info.
I have tried renewing the token manually (mywebsite.co.uk/squareWebPay_handler.php) and nothing looks awry, to me, in the browser's console - everything is returning 200 OK.
I am open to any debug suggestions.
Screenshot of the Console:
Edit: removing image I'll repost with my oauth details removed.
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
hi vic,
i wish these situations were the case. i am not able to reproduce it on your site. i am only able to fix what i can reproduce.
allow me to explain a little bit about this process: it is a 2-step process; the first step sends the credit card data to square, it returns a token. square_webPay takes this token, adds it onto the html form on the OPC page, and then submits the whole form to your zen-cart installation. at that point, ZC has control, and then ZC submits that token to square.
if for whatever reason that token does NOT make it onto the html form, you see the error that you are getting.
with regards to the 2 situations you mention above, i have a couple of videos. a GENERIC DECLINE is coming back from square. the SQ-MISSING-TOKEN error is an error from square_webPay as we are not submitting anything to square as we do not have the result from the first step of the process:
https://www.dropbox.com/s/i3zc3t5diu...20PM.webm?dl=0
https://www.dropbox.com/s/6mc9y5gvf3...20PM.webm?dl=0
you are correct here. the previous module selected the radio button the moment you touched the input fields. the webPay module selects the radio button after the first input, and NOT when a field gets focused.
unfortunately that is impossible to change due to the architecture of the new square infrastructure. it was something that i remember looking at rather closely. but again this is not the problem as one can see from my videos.
that said, i DO appreciate the troubleshooting with the specific keystrokes that you think are causing the problem. if we are able to reproduce it, we can then fix it.
best.
Hi Carl,
I have posted three videos of the following scenarios that I hope might help. They are from the same live site you tested on and unchanged in any way.
No Radio button selected, card data entered directly. returns SQ_Missing_Token
https://drive.google.com/file/d/16Bi...ew?usp=sharing
Radio Button Selected by user then card data entered returns Generic_Decline
https://drive.google.com/file/d/1mrO...ew?usp=sharing
After getting SQ_Missing_Token card data entered immediately again giving Generic_Decline
https://drive.google.com/file/d/1RpE...ew?usp=sharing
I hope it can be of help to visually see the results.
Also when I turn off OPC and have the standard checkout process, entering the card details directly into the card fields without selecting the radio button, gives the positive result the Generic_Decline.
Hope the results are useful.
Kind regards
Vic :smile:
Re: Square WebPay support thread.
Quote:
Originally Posted by
Valencia
Hi Carl,
I have posted three videos of the following scenarios that I hope might help. They are from the same live site you tested on and unchanged in any way.
No Radio button selected, card data entered directly. returns SQ_Missing_Token
https://drive.google.com/file/d/16Bi...ew?usp=sharing
Radio Button Selected by user then card data entered returns Generic_Decline
https://drive.google.com/file/d/1mrO...ew?usp=sharing
After getting SQ_Missing_Token card data entered immediately again giving Generic_Decline
https://drive.google.com/file/d/1RpE...ew?usp=sharing
I hope it can be of help to visually see the results.
Also when I turn off OPC and have the standard checkout process, entering the card details directly into the card fields without selecting the radio button, gives the positive result the Generic_Decline.
Hope the results are useful.
Kind regards
Vic :smile:
This is what I am getting with OPC:
No Radio button selected, card data entered directly. returns SQ_Missing_Token
https://drive.google.com/file/d/16Bi...ew?usp=sharing
If the radio button is checked before entering the card details, the payment works. If it isn't checked, it doesn't work. Your video highlights the this scenario.
If you do the the same process on the standard checkout, it works perfectly as it should.
Re: Square WebPay support thread.
in trying to activate the token this error is being generated:
[11-Jul-2022 08:42:47 America/Chicago] Request URI: /squareWebPay_handler.php?code=sq0cgp-hSqjZnDct9f2STlglgrcSQ&response_type=code&state=7797894d5590c14fe34769c3199a7d85 8dbc1c6646e6b65a1f1589a6bf27439a, IP address: 66.232.98.194
--> PHP Fatal error: Uncaught Error: Class 'Square\Models\ObtainTokenRequest' not found in /includes/modules/payment/square_webPay.php:690
Stack trace:
#0 /squareWebPay_handler.php(33): square_webPay->exchangeForToken('sq0cgp-hSqjZnDc...')
#1 {main}
thrown in /includes/modules/payment/square_webPay.php on line 690.
I checked and made sure all the files were uploaded and the old module removed.
Re: Square WebPay support thread.
Quote:
Originally Posted by
delia
I checked and made sure all the files were uploaded and the old module removed.
If you actually removed the files from their locations, that can be part of the problem.
The best way is to have all the files on the site but, don't click on install.
If all the old files are on the site, go to the circled i for the old square. If it says Install Module, all is fine. If not, click on Remove Module which actually leaves needed files on the site.
Re: Square WebPay support thread.
Getting emails saying
Authorization error: 'VOICE_FAILURE' Sent to Square: SquareModelsCreatePaymentRequest Object ....
Sometimes the charge succeeds on retry; other times the customer has to switch to PayPal or some other payment method.
Re: Square WebPay support thread.
I guess what I'm wondering is, if it's possible to deduce that you're in this state and give a message to the customer in the cart.
Re: Square WebPay support thread.
Quote:
Originally Posted by
swguy
I guess what I'm wondering is, if it's possible to deduce that you're in this state and give a message to the customer in the cart.
how do you know i'm not already doing that?
error messages are already added to the message stack and displayed to the customer. see:
https://github.com/proseLA/square_we....php#L428-L433
line 431.
Re: Square WebPay support thread.
@carlwhat is maintaining the Square plugin; please don't post information about your fork - it's disrespectful and confusing to new people.
I will immediately delete such posts.