Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
One customer (with latest WebPay and OPC) is experiencing random Missing Token Reports. With nearly seventy successful transactions since this log file, there have only been five of these logs reported.
I cannot find a commonality among them. topkayakerDOTcom
Code:
20-May-2022 21:50:40 UTC] 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 234
It just does not make sense.
From the store owner
Quote:
My first attempt (Citi) I got this error message:
We have a problem on our end. So Sorry! Please report this error to the Store Owner: SQ-MISSING-TOKEN
I changed to another card (Cap1) and was successful, Order No. #####.
I then tried the first card (Citi) again and was successful, Order No. #####.
I did Not clear my cache or use the F5 key. It is not my habit to do so. I only do that if I have no other option and must get a transaction to process.
Shortly thereafter I called (shop customer) to place the order for him online from my computer at the office. The Error message below was displayed:
Your transaction failed due to an error: [GENERIC_DECLINE] Authorization error: 'GENERIC_DECLINE'
Yes, we went over all the card and address info VERY carefully, almost but not quite to the point where I was challenging his competency.
He called back after talking to his bank. The bank said that the many transactions were approved by the “bank” but declined by the store. I assume store to be Square (fraud protection) and/or WEBSITE.
Any thoughts greatly appreciated
1 Attachment(s)
Re: Square WebPay support thread.
More information on the subject.
Made sure I was the only one processing an order and monitored from cart addition to completed charge with the chrome console.
The error log created was
Code:
[26-May-2022 21:54:53 UTC] 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 234
Yet, the successful transaction was made one second later.
Attachment 20012
So, if I am getting this result correctly, we have situations where the bank okays and ZC doesn't AND (in this case) the process worked despite the missing token.:dontgetit
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
More information on the subject.
Made sure I was the only one processing an order and monitored from cart addition to completed charge with the chrome console.
The error log created was
Code:
[26-May-2022 21:54:53 UTC] 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 234
Yet, the successful transaction was made one second later.
Attachment 20012
So, if I am getting this result correctly, we have situations where the bank okays and ZC doesn't AND (in this case) the process worked despite the missing token.:dontgetit
i have been to said site and everything operated correctly as far as square looks.
the error message indicates that the payment form was submitted, but the response from square was not on the form. any time you see line 234 in v1.0.1, that means the post of the form to your ZC server does NOT have any response from square.
it does NOT mean you submitted a transaction, although you may/probably/most definitely (pick one) might have. looking at your square dashboard will tell you if you have. the error message means that if there was a response, it was not on the form and therefore ZC can not do anything with it because it does not know anything about it.
this is the essence of the problem with OPC that was resolved with the changes made (and implemented on said site) with regards to OPC.
if you are getting the error and then everything works properly a second later, you are most likely having a javascript problem. 2 event listeners are submitting the same form one after the other would be 1 guess.
you are having other javascript errors on said site, which may cascade down to your problem. but in my latest review, everything looked fine to me. and the response from square was on the form. and i got an appropriate error:
Your transaction failed due to an error: [PAN_FAILURE] Authorization error: 'PAN_FAILURE'
that error comes from square.
Re: Square WebPay support thread.
Unfortunately, I have no access to the Square Dashboard.
I've sepent the day trying to find any javascipt error elsewhere. And, I had done that transaction in down for maintenance with only my IP as allowed.
Watched the console through the whole process with no problems noted yet got the token notice one second before the success notice.
I suspected older mods like Products with Attributes Stocck and Numinix Product Fields but can't find any evidence that they are the culprits.
If you have any advice as to where else I might look, it would be greatly appreciated.
Re: Square WebPay support thread.
I believe I fixed the apostrophe error where the credit card form would not load when a users name or address contained the apostrophe character.
I edited the file jscript_square_webPay.php inside the in includes/modules/pages/checkout_payment folder.
lines 88 to 103
PHP Code:
async function verifyBuyer(payments, token) {
const verificationDetails = {
amount: '<?= zen_round($order->info['total'], 2); ?>',
billingContact: {
addressLines: ["<?= $order->billing['street_address']; ?>", "<?= $order->billing['suburb']; ?>"],
familyName: "<?= $order->billing['lastname']; ?>",
givenName: "<?= $order->billing['firstname']; ?>",
email: "<?= $order->customer['email_address']; ?>",
country: "<?= $order->billing['country']['iso_code_2']; ?>",
phone: '<?= $order->customer['telephone']; ?>',
state: "<?= $order->billing['state']; ?>",
city: "<?= $order->billing['city']; ?>",
},
currencyCode: '<?= $order->info['currency']; ?>',
intent: 'CHARGE',
};
it worked for me but please verify this is the correct fix. thanks!
Re: Square WebPay support thread.
Quote:
Originally Posted by
out1
I believe I fixed the apostrophe error where the credit card form would not load when a users name or address contained the apostrophe character.
I edited the file jscript_square_webPay.php inside the in includes/modules/pages/checkout_payment folder.
lines 88 to 103
PHP Code:
async function verifyBuyer(payments, token) {
const verificationDetails = {
amount: '<?= zen_round($order->info['total'], 2); ?>',
billingContact: {
addressLines: ["<?= $order->billing['street_address']; ?>", "<?= $order->billing['suburb']; ?>"],
familyName: "<?= $order->billing['lastname']; ?>",
givenName: "<?= $order->billing['firstname']; ?>",
email: "<?= $order->customer['email_address']; ?>",
country: "<?= $order->billing['country']['iso_code_2']; ?>",
phone: '<?= $order->customer['telephone']; ?>',
state: "<?= $order->billing['state']; ?>",
city: "<?= $order->billing['city']; ?>",
},
currencyCode: '<?= $order->info['currency']; ?>',
intent: 'CHARGE',
};
it worked for me but please verify this is the correct fix. thanks!
have u downloaded the latest version 1.0.1? it was made available last week and addressed this problem by making use of the php addslashes function.
best.
Re: Square WebPay support thread.
Square WebPay install instructions available in the Zen Cart docs:
https://docs.zen-cart.com/user/payment/square/
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
have u downloaded the latest version 1.0.1? it was made available last week and addressed this problem by making use of the php addslashes function.
best.
Thank you I will check the updated version, I had version 1.0 from May 21.
Re: Square WebPay support thread.
Quote:
Originally Posted by
out1
Thank you I will check the updated version, I had version 1.0 from May 21.
I know this is a simple update, but are there update instructions available?
Re: Square WebPay support thread.
Quote:
Originally Posted by
royaldave
I know this is a simple update, but are there update instructions available?
sorry no. i should have included something.
it’s a simple file replacement. but nothing in the sdk has changed.
you can copy all of the files without the need to copy the directory:
for_upload/includes/modules/payment/square_webPay
hope that helps!