Zen Cart Logo
Forums / Addon Payment Modules / Square WebPay support thread.

Square WebPay support thread.

Views: 128,181

Results 361 to 380 of 800
3 Dec 2022, 10:27 PM
#361
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Square WebPay support thread.

edadk:

Upgraded my Square module to the WebPay module last week, was working great, taking charges with no issue.

Today I got a debug file with this at the end:
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 /usr/www/users/xx/includes/modules/payment/square_webPay.php on line 261.

Customer abandoned their cart at checkout_payment.

I saw some other messages about this, but must have missed the solution. How can I fix this?
Using 1.56c, php 7.3, standard checkout flow, daily cron task for handler update.

many thanks,
Ed

what is your checkout process? are you using OPC? FEC? or standard checkout?

what is your website?

3 Dec 2022, 10:51 PM
#362
edadk avatar

edadk

Zen Follower

Join Date:
Nov 2008
Posts:
191
Plugin Contributions:
0

Re: Square WebPay support thread.

carlwhat:

what is your checkout process? are you using OPC? FEC? or standard checkout?

what is your website?

Standard checkout flow. Msg sent with website.
thanks,
Ed

3 Dec 2022, 11:19 PM
#363
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

edadk:

Standard checkout flow. Msg sent with website.
thanks,
Ed

site looks and operates fine to me.

that error mostly happens when OPC is not configured correctly. and i am not able to reproduce it.

was the customer using a coupon? or do you have any virtual products?

3 Dec 2022, 11:23 PM
#364
edadk avatar

edadk

Zen Follower

Join Date:
Nov 2008
Posts:
191
Plugin Contributions:
0

Re: Square WebPay support thread.

I do not have any active coupons. I have a couple of downloadable products, but not something that usually sells. I got several detailed error messages about "Pan Failure" from what you did on the site, posted to you privately.

3 Dec 2022, 11:37 PM
#365
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

edadk:

I do not have any active coupons. I have a couple of downloadable products, but not something that usually sells. I got several detailed error messages about "Pan Failure" from what you did on the site, not sure if I should post them or send them privately.

a PAN failure is the message that comes back from square. i placed an order with a test credit card, and square properly responded to that test credit card number. it is perfectly fine to post that message here, and no need to PM me that. and frankly i have never understood why users do not want to post their live website URLs on the board. but i suppose i am in the minority.

that message is expected.

your previous message is something different. it means that the information necessary to submit to square was not found. why that is, i can not say. it worked fine for me.

if it happens again, i would try to see what was in the cart and exactly what the customer was doing.

very hard to fix if i can not reproduce.

best.

4 Dec 2022, 12:59 AM
#366
edadk avatar

edadk

Zen Follower

Join Date:
Nov 2008
Posts:
191
Plugin Contributions:
0

Re: Square WebPay support thread.

Thanks very much for your efforts to look into this, much appreciated.

If it happens again, I'll try to get additional info from the customer about what they were buying, and what they saw when they tried to check out.

5 Dec 2022, 9:58 PM
#367
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square WebPay support thread.

This was found in troubleshooting today. We loaded the 1.03 files to Zen Cart 1.5.8 and were getting stopped at Confirm Checkout with a token error.

For those wondering about 1.5.8, WebPay works exactly as expected in Zen Cart 1.5.8 WITHOUT One Page Checkout.

If you are going to use WebPay AND One Page Checkout with Zen Cart, you will need to get the OLD square javascript file from includes/modules/pages/checkout_payment/ called jscript_square.php.

Copy or FTP that file to includes/modules/pages/checkout_one/.

The includes/modules/pages/checkout_payment/jscript_square.php is still part of the 1.5.8 distribution zip file. It may not be part of further distros.

5 Dec 2022, 11:41 PM
#368
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

dbltoe:

This was found in troubleshooting today. We loaded the 1.03 files to Zen Cart 1.5.8 and were getting stopped at Confirm Checkout with a token error.

For those wondering about 1.5.8, WebPay works exactly as expected in Zen Cart 1.5.8 WITHOUT One Page Checkout.

If you are going to use WebPay AND One Page Checkout with Zen Cart, you will need to get the OLD square javascript file from includes/modules/pages/checkout_payment/ called jscript_square.php.

Copy or FTP that file to includes/modules/pages/checkout_one/.

The includes/modules/pages/checkout_payment/jscript_square.php is still part of the 1.5.8 distribution zip file. It may not be part of further distros.

this is just wrong.

following this advice is not recommended by me; and i wrote the square webPay module.

the code from that file is here.

looking at it here, one can see that said file will just return false without doing anything.

if (!defined('MODULE_PAYMENT_SQUARE_STATUS') || MODULE_PAYMENT_SQUARE_STATUS != 'True' || (!defined('MODULE_PAYMENT_SQUARE_APPLICATION_ID') || MODULE_PAYMENT_SQUARE_ACCESS_TOKEN == '')) {
    return false;
}
if ($payment_modules->in_special_checkout() || empty($square) || !$square->enabled) {
    return false;
}

there is nothing in the jscript_square.php that has anything to do with square webPay.

why this situation works for this poster, i can not say; nor will i offer a guess.

best.

6 Dec 2022, 6:32 AM
#369
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square WebPay support thread.

Of course you won't offer a guess.

Your abilities as a programmer are bar none,

Your abilities in dealing with a proven problem are either "I don't use that mod with it" or "it should not being doing that".

Thank you Captain Obvious.

After several successful orders on the site this evening, I went in and (again) changed the jscript_square.php to jscript_goofy.php All OPC orders failed with a token error.

Changed it back and orders processed completely.

I had similar problems in 1.5.7d with removed (not uninstalled) files for the old square or I would NEVER have thought to try the jscript_square.php insertion.

Sadly, I expected the denigration and washing of hands but, maybe it just might help someone in the same situation.

6 Dec 2022, 6:46 AM
#370
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

dbltoe:

Of course you won't offer a guess.

Your abilities as a programmer are bar none,

Your abilities in dealing with a proven problem are either "I don't use that mod with it" or "it should not being doing that".

Thank you Captain Obvious.

After several successful orders on the site this evening, I went in and (again) changed the jscript_square.php to jscript_goofy.php All OPC orders failed with a token error.

Changed it back and orders processed completely.

I had similar problems in 1.5.7d with removed (not uninstalled) files for the old square or I would NEVER have thought to try the jscript_square.php insertion.

Sadly, I expected the denigration and washing of hands but, maybe it just might help someone in the same situation.

please leave this thread. your sarcasm is not appropriate nor appreciated...

your lack of trouble shooting skills on these boards is well documented.

considering my contributions to the ongoing development of zen-cart, your lack of respect for me and my work is quite amazing...

now please go bugger off, and convince someone else of your value while you capitalize on others work.

6 Dec 2022, 6:58 AM
#371
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square WebPay support thread.

You're more than welcome to add me to you ignore list.

I would like to point out though,

If the old jscript had nothing in it but a beginning and closing PHP tag, it's merely being required by some other file SOMEWHERE during the process would break the chain if it were not present.

You can consider that possibility or not.

6 Dec 2022, 7:10 PM
#372
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: Square WebPay support thread.

dbltoe:

If you are going to use WebPay AND One Page Checkout with Zen Cart, you will need to get the OLD square javascript file from includes/modules/pages/checkout_payment/ called jscript_square.php.

I will have to disagree with that. I have several clients using this plugin (Square WebPay) with OPC and it works like a charm out of the box with the jscript_square_webPay.php provided with the plugin.

@dbltoe - did you go through the tokenization (authentication) process with the new Square WebPay module after installing it? Updated the callback URL in your Square dashboard etc? Did you get the white page that just says "token set" or something like that, can't remember the exact wording now?

carlwhat:

this is just wrong.

following this advice is not recommended by me;

+1

6 Dec 2022, 8:02 PM
#373
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square WebPay support thread.

balihr:

I will have to disagree with that. I have several clients using this plugin (Square WebPay) with OPC and it works like a charm out of the box with the jscript_square_webPay.php provided with the plugin.
@dbltoe - did you go through the tokenization (authentication) process with the new Square WebPay module after installing it? Updated the callback URL in your Square dashboard etc? Did you get the white page that just says "token set" or something like that, can't remember the exact wording now?
+1First of all, thanks for a civil discourse.

About Square. I have been using and setting up Square even before it was part of Zen Cart. I was the one that confirmed WebPay's operation with 1.5.6c and PHP 7.3. See thread Post #2

Even, the required use of a possibly obsolete API Version, was also entered as mentioned in the docs.

As I stated, we have had no problem running WebPay with 1.5.8. However, with the addition of OPC, we were getting the result below as soon as the confirm order was clicked. This site had never had Square before. 1.5.8 was brought in without anything but old images, old define pages, and the old DB. As a totally wild thought, I added the jscript from drByte's mod to the checkout_one folder for lat9's OPC. It is still mentioned in the compatibility ortion of his install notes. Instant and continuing success from then on.

Again, last night after things setttled down on the new site, we again renamed the old file and got the same error when trying through OPC. While not familiar with the intricacies of code, I can recognize the cause and effect we are getting without the file and with. We have noticed this morning that Edit Orders does not seem to be playing nice (maybe the new languages setup) but I have never known edit orders to affect front-end ordering.

I went as far with it as I was capable and brought it to the forum in an attempt to see if someone else was experiencing it and possibilty some direction to look for a fix. I also placed the same info in the OPC forum.

I agree with Carlwhat in that there is no code in the file that should be needed. Yet, as I mentioned later, if the file is in a require somewhere else, it's absence could easily create the fatal error. This is the first time I have ever seen this error message in all of our setups. I have seen others and spinners that turn for days if you let them but, never this. If the fix works for one other person, that's reaason enough for me to mention it.

6 Jan 2023, 12:18 PM
#374
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,278
Plugin Contributions:
37

Re: Square WebPay support thread.

Any thoughts on adding a Square hosted payment page option? The new PCI changes are heavy....

~Melanie

6 Jan 2023, 3:28 PM
#375
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

mprough:

Any thoughts on adding a Square hosted payment page option? The new PCI changes are heavy....

~Melanie

i have no idea what you mean.

i am not a lawyer. i do not claim to be an expert on PCI-DSS compliance. nor should anything i write be construed as legal advice; or that one is in or not in pci compliance.

square webPay makes use of the square web payments sdk. i would suggest reading a bit here.

all field inputs (and in fact the form) are handled by square, in a PCI compliant manner (according to them).

using the square checkout api (their hosted payment page solution) does not make you any more or less compliant with the PCI-DSS requirements.

best.

7 Jan 2023, 1:30 PM
#376
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,278
Plugin Contributions:
37

Re: Square WebPay support thread.

carlwhat:

i have no idea what you mean.

i am not a lawyer. i do not claim to be an expert on PCI-DSS compliance. nor should anything i write be construed as legal advice; or that one is in or not in pci compliance.

square webPay makes use of the square web payments sdk. i would suggest reading a bit here.

all field inputs (and in fact the form) are handled by square, in a PCI compliant manner (according to them).

using the square checkout api (their hosted payment page solution) does not make you any more or less compliant with the PCI-DSS requirements.

best.

I looked all over for that LOL, thank you

7 Jan 2023, 3:15 PM
#377
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

mprough:

I looked all over for that LOL, thank you

apparently square could do a better job with their SEO....

7 Jan 2023, 10:21 PM
#378
pazdar avatar

pazdar

Zen Follower

Join Date:
Jan 2008
Posts:
174
Plugin Contributions:
0

Re: Square WebPay support thread.

Installed the module back in October. I haven't been able to edit the customer's orders. When I clicked "edit" on a previous order today I got the following in the error log:

/admin/index.php?cmd=orders&page=1&oID=729&action=edit, IP address: xx.xxx.xxx.xx
#1 require() called at [/includes/modules/payment/square_webPay.php:508]
#2 square_webPay->admin_notification() called at [/admin/orders.php:731]
#3 require(/admin/orders.php) called at [/admins/index.php:11]
--> PHP Warning: require(/includes/modules/payment/square_support/square_admin_notification.php): failed to open stream: No such file or directory in /includes/modules/payment/square_webPay.php on line 508.

[07-Jan-2023 14:38:57 America/Boise] PHP Fatal error: require(): Failed opening required '/includes/modules/payment/square_support/square_admin_notification.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /includes/modules/payment/square_webPay.php on line 508

I should I changed this to not show the name of my admin page or ip address. Any ideas?

8 Jan 2023, 12:36 AM
#379
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

pazdar:

Installed the module back in October. I haven't been able to edit the customer's orders. When I clicked "edit" on a previous order today I got the following in the error log:

/admin/index.php?cmd=orders&page=1&oID=729&action=edit, IP address: xx.xxx.xxx.xx
#1 require() called at [/includes/modules/payment/square_webPay.php:508]
#2 square_webPay->admin_notification() called at [/admin/orders.php:731]
#3 require(/admin/orders.php) called at [/admins/index.php:11]
--> PHP Warning: require(/includes/modules/payment/square_support/square_admin_notification.php): failed to open stream: No such file or directory in /includes/modules/payment/square_webPay.php on line 508.

[07-Jan-2023 14:38:57 America/Boise] PHP Fatal error: require(): Failed opening required '/includes/modules/payment/square_support/square_admin_notification.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /includes/modules/payment/square_webPay.php on line 508

I should I changed this to not show the name of my admin page or ip address. Any ideas?

(i'm assuming you are running v157...)

look at this link:

https://github.com/zencart/zencart/tree/v157/includes/modules/payment/square_support

there are 2 files inside a directory. those files are either missing or they have the wrong permissions on them.

best.

11 Jan 2023, 4:26 PM
#380
alexdolgin avatar

alexdolgin

New Zenner

Join Date:
Jan 2023
Posts:
2
Plugin Contributions:
0

Re: Square WebPay support thread.

Ver. 1.5.7c Square Web Payments Module 1.0.1 [using SDK: 17.2.0.20220216]
Square does not process the customer purchase unless I go to the "Click for Additional Payment Handling Options" (our admin section), then

Capture Transaction
You may capture previously-authorized funds here:
After I hit "Do Capture" the process is finalized and Square emails me the confirmation of the transaction (Payment received). I did not have to do that while using the old Square module. Is it supposed to work this way now, or I am missing something in the setup? TIA