Forums / Addon Payment Modules / Square WebPay support thread.

Square WebPay support thread.

Views: 129,451

Results 101 to 120 of 803
16 May 2022, 3:35 PM
#101
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Square WebPay support thread.

lat9:

Since the site is running https-all-the-time, your site's root .htaccess file should 'support' that. Make a backup copy and add the following clauses close to the top of the file to 'force' the access to https://vinyldecalsuperstore.com/{whatever} when the access is made as

vinyldecalsuperstore.com/VDSstore/{whatever}
http://vinyldecalsuperstore.com/{whatever}
http://www.vinyldecalsuperstore.com/{whatever}
https://www.vinyldecalsuperstore.com/{whatever}

RewriteCond %{SERVER_PORT} 80 [OR]
RewriteCond %{HTTP_HOST} ^www.vinyldecalsuperstore.com$ [NC]
RewriteRule (.*) https://vinyldecalsuperstore.com/$1 [R=301,L]


I've got a bunch of this stuff in my .htaccess folder right now, including a domain that points to my primary vinyldecalsuperstore.com   

RewriteCond %{HTTP_HOST} ^vdsdecal.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.vdsdecal.com$
RewriteRule ^/?$ "https://vinyldecalsuperstore.com/" [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^vinyldecalsuperstore.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.vinyldecalsuperstore.com$
RewriteRule ^/?$ "https://vinyldecalsuperstore.com/" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "https://vinyldecalsuperstore.com/VDSstore/" [R=301,L]
RewriteBase /

Rewrites all URLS without VDSstore in them

RewriteCond %{REQUEST_URI} !^/VDSstore/

Rewrites all URLS [Replace "example" with the actual domain, without the TLD (.com, .net, .biz, etc)]

RewriteCond %{HTTP_HOST} ^(www.)?vinyldecalsuperstore.

Rewrite all those to insert /folder

RewriteRule ^(.*)$ /VDSstore/$1 [L]


Is there a particular order I should have all this and if so, where should I insert the code you gave me?  
Thank you so very much!

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

16 May 2022, 4:23 PM
#102
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

VDecalS:

I've got a bunch of this stuff in my .htaccess folder right now, including a domain that points to my primary vinyldecalsuperstore.com

RewriteCond %{HTTP_HOST} ^vdsdecal.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.vdsdecal.com$
RewriteRule ^/?$ "https://vinyldecalsuperstore.com/" [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^vinyldecalsuperstore.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.vinyldecalsuperstore.com$
RewriteRule ^/?$ "https://vinyldecalsuperstore.com/" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "https://vinyldecalsuperstore.com/VDSstore/" [R=301,L]
RewriteBase /

Rewrites all URLS without VDSstore in them

RewriteCond %{REQUEST_URI} !^/VDSstore/

Rewrites all URLS [Replace "example" with the actual domain, without the TLD (.com, .net, .biz, etc)]

RewriteCond %{HTTP_HOST} ^(www.)?vinyldecalsuperstore.

Rewrite all those to insert /folder

RewriteRule ^(.*)$ /VDSstore/$1 [L]

> 
> Is there a particular order I should have all this and if so, where should I insert the code you gave me?  
> Thank you so very much!

you are having a token problem!

<https://vinyldecalsuperstore.com/VDSstore/squareWebPay_handler.php>

is returning a 417.  fix that, and then lets see what happens.

i think there is info on this thread on it.  but let us know if you need help with it.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

16 May 2022, 5:23 PM
#103
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: Square WebPay support thread.

carlwhat:

you are having a token problem!

https://vinyldecalsuperstore.com/VDSstore/squareWebPay_handler.php

is returning a 417. fix that, and then lets see what happens.

i think there is info on this thread on it. but let us know if you need help with it.

That's probably it. My Square Developer OAuth page says I have 8 Active tokens. Only I don't know how to even view them! :bangin:

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

16 May 2022, 10:08 PM
#104
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: Square WebPay support thread.

In Square Developer: I've replaced my token, and replaced my OAuth Application Secret. So now I'm up to 9 active tokens.
then;
In my Zen-Cart I removed the Square WebPay Module, then Installed it with the new OAuth Application Secret and tried to Authorize with the green bar and still get the Debug logs as stated in #94
I'm feeling beaten down. Walking away from this for a bit before trying the restore from backup. I still have PayPal for now.

Thanks all.

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

16 May 2022, 10:27 PM
#105
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

VDecalS:

In Square Developer: I've replaced my token, and replaced my OAuth Application Secret. So now I'm up to 9 active tokens.
then;
In my Zen-Cart I removed the Square WebPay Module, then Installed it with the new OAuth Application Secret and tried to Authorize with the green bar and still get the Debug logs as stated in #94
I'm feeling beaten down. Walking away from this for a bit before trying the restore from backup. I still have PayPal for now.

Thanks all.

but we are so close....

again, the problem is here:

https://vinyldecalsuperstore.com/VDSstore/squareWebPay_handler.php

this is returning a 417. in a fully functioning implementation, it should return a 200.

on this line:

https://github.com/proseLA/square_webPay/blob/544e62100776e0eab364e291ace07ed3544c9414/for_upload/squareWebPay_handler.php#L22

set that to true, ie:

$verbose = true;

then, click on the link above, and lets see what the error message is.

just that, and we should have some good info to go on.

also, are we not getting any logs? we should have some logs if the token is not refreshed properly.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

16 May 2022, 10:52 PM
#106
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Square WebPay support thread.

Perhaps these instructions will help.

Solely put together by me and not a sanctioned part of the mod.

https://myzencarthost.com/index.php?rp=/knowledgebase/4/How-to-Activate-the-Square-WebPay-Module.html

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

17 May 2022, 3:32 PM
#107
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

VDecalS:

In Square Developer: I've replaced my token, and replaced my OAuth Application Secret. So now I'm up to 9 active tokens.
then;
In my Zen-Cart I removed the Square WebPay Module, then Installed it with the new OAuth Application Secret and tried to Authorize with the green bar and still get the Debug logs as stated in #94
I'm feeling beaten down. Walking away from this for a bit before trying the restore from backup. I still have PayPal for now.

Thanks all.

ok, we were going down the wrong track. this problem is solved.

admin -> configuration -> sessions -> recreate session.

this value was set to true. setting it to false has fixed the time out error.

i will have to explore a bit as to what that config value does and why it does not destroy the session in paypal, but it destroys it in square.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

17 May 2022, 4:31 PM
#108
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: Square WebPay support thread.

carlWHAT? called the savior by the chief bottle washer... AND ME!:bow:

cake sent via PayPal:hug:

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

17 May 2022, 4:48 PM
#109
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

VDecalS:

carlWHAT? called the savior by the chief bottle washer... AND ME!:bow:

cake sent via PayPal:hug:

:thumbsup:

thank you.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

18 May 2022, 2:11 AM
#110
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

carlwhat:

ok, we were going down the wrong track. this problem is solved.

admin -> configuration -> sessions -> recreate session.

this value was set to true. setting it to false has fixed the time out error.

i will have to explore a bit as to what that config value does and why it does not destroy the session in paypal, but it destroys it in square.

best.

ok, this worked for a hot minute, but now it is not.

i have some more information, in case someone would like to chime in... which would be appreciated.

standard 3 page checkout. on chrome, one gets to the checkout confirmation page. at the end of the tpl_checkout_confirmation_default.php script, the session looks intact. HOWEVER, after the page is completely rendered, the session is destroyed. this is confirmed by clicking on the my account link (without clicking on the order confirmation submit button), and it directs one to a login page, which is unexpected behavior.

interestingly enough, this behavior does NOT happen on firefox. the expected process happens, and there is no destruction of the session.

apparently this behavior does NOT happen with paypal express checkout on firefox or on chrome (ie it works).

session settings can be seen here:

https://www.dropbox.com/s/8tk970t6c28l6yo/Screenshot%20from%202022-05-17%2019-06-12.png?dl=0

if anyone has any ideas, i am listening.

thanks in advance.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

19 May 2022, 5:13 PM
#111
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: Square WebPay support thread.

Dear CarlWhat?,

As advised, I have removed the old Square module php files by following the hierarchy of your Square WebPay module.
I'm no longer seeing the "old" Square module in my Admin/Payments.
There is no more getting booted out on Chrome, Edge, or Firefox!

Removing the old Square module (php files) is the step that messed me up the most, because I thought the "Remove Module" in Admin/Payments would do the trick.

Thank you so much for your hands-on help, patience, guidance and explanations. I've learned so much from you with this.

I'm in awe of the many contributors of Zen-Cart and appreciate what excellent help I am able to get from the forum community.

nbl to carlWhat? et al

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

21 May 2022, 2:51 PM
#112
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: Square WebPay support thread.

Maybe not all is well. I've gotten no payments through Square WebPay, but this morning I received this "Square Alert"

May-21-2022 09:07:49
=================================

Error Dump: [VOICE_FAILURE]: Authorization error: 'VOICE_FAILURE'

Sent to Square: SquareModelsCreatePaymentRequest Object
(
    [sourceId:SquareModelsCreatePaymentRequest:private] => cnon:*private letter-number*
    [idempotencyKey:SquareModelsCreatePaymentRequest:private] => *private letter-number*
    [amountMoney:SquareModelsCreatePaymentRequest:private] => SquareModelsMoney Object
        (
            [amount:SquareModelsMoney:private] => *order total numbers*
            [currency:SquareModelsMoney:private] => USD
        )

    [tipMoney:SquareModelsCreatePaymentRequest:private] => 
    [appFeeMoney:SquareModelsCreatePaymentRequest:private] => 
    [delayDuration:SquareModelsCreatePaymentRequest:private] => 
    [autocomplete:SquareModelsCreatePaymentRequest:private] => 
    [orderId:SquareModelsCreatePaymentRequest:private] => 
    [customerId:SquareModelsCreatePaymentRequest:private] => 
    [locationId:SquareModelsCreatePaymentRequest:private] => *private*
    [teamMemberId:SquareModelsCreatePaymentRequest:private] => 
    [referenceId:SquareModelsCreatePaymentRequest:private] => 
    [verificationToken:SquareModelsCreatePaymentRequest:private] => verf:*letter/number*
    [acceptPartialAuthorization:SquareModelsCreatePaymentRequest:private] => 
    [buyerEmailAddress:SquareModelsCreatePaymentRequest:private] => *customer email*##########################
    [billingAddress:SquareModelsCreatePaymentRequest:private] => SquareModelsAddress Object
        (
            [addressLine1:SquareModelsAddress:private] => 
            [addressLine2:SquareModelsAddress:private] => 
            [addressLine3:SquareModelsAddress:private] => 
            [locality:SquareModelsAddress:private] => 
            [sublocality:SquareModelsAddress:private] => 
            [administrativeDistrictLevel1:SquareModelsAddress:private] => 
            [postalCode:SquareModelsAddress:private] => 
            [country:SquareModelsAddress:private] => 
        )

    [shippingAddress:SquareModelsCreatePaymentRequest:private] => SquareModelsAddress Object
        (
            [addressLine1:SquareModelsAddress:private] => 
            [addressLine2:SquareModelsAddress:private] => 
            [addressLine3:SquareModelsAddress:private] => 
            [locality:SquareModelsAddress:private] => 
            [sublocality:SquareModelsAddress:private] => 
            [administrativeDistrictLevel1:SquareModelsAddress:private] => 
            [postalCode:SquareModelsAddress:private] => 
            [country:SquareModelsAddress:private] => 
        )

    [note:SquareModelsCreatePaymentRequest:private] => *customer name*; Ordered:(1) *my product*; Deliver To: *customer address and phone number in Canada*  Vinyl Decal Superstore
    [statementDescriptionIdentifier:SquareModelsCreatePaymentRequest:private] => 
    [cashDetails:SquareModelsCreatePaymentRequest:private] => 
    [externalDetails:SquareModelsCreatePaymentRequest:private] => 
)

I'm hoping that it is just the customer's card requirement as stated on Square's reference to ErrorCodes

VOICE_FAILURE
The card issuer declined the request because the issuer requires voice authorization from the cardholder.

Has anyone else had this problem? Perhaps this is an addition requirement because it's a Canadian purchase from USA location?

Thanks for your input!

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

21 May 2022, 3:01 PM
#113
out1 avatar

out1

New Zenner

Join Date:
Nov 2020
Posts:
5
Plugin Contributions:
0

Re: Square WebPay support thread.

ChuckPhillips:

ZC 1.56c, PHP 7.4,

If the customer has an apostrophe in their name (like Andre') or address (like River Fall's Place), the CC form will not load. Does not appear that was an issue with the old plugin.

Removing the apostrophe will allow checkout.

1.57a with php 7.4 and this is a minor problem for me as well. A fix would be great.

Thanks!

21 May 2022, 7:16 PM
#114
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: Square WebPay support thread.

ALL IS WELL. The customer switched credit cards (or fixed input) and sale went through.

On a related note, while removing the old Square module (php files), I went too far and also deleted the folder
includes\modules\payment\square_support
I was getting a partial white page, but was able to figure out the problem by reading the DEBUG log.

Thank you all

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

23 May 2022, 2:56 PM
#115
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Square WebPay support thread.

I'm preparing to upgrade Square to WebPay (and OPC) and am catching up with the various posts in this thread and wanted to confirm the following,

VDecalS:

As advised, I have removed the old Square module php files by following the hierarchy of your Square WebPay module.

I assume we do remove the existing Square plugin by uninstalling it within Admin and removing all of its files? The above post mentions following the hierachy of WebPay, I've not seen this or the removal of files suggested before, perhaps it was in a PM. (I note that WebPay makes use of the existing Square database table, so we would leave that alone)

VDecalS:

.... while removing the old Square module (php files), I went too far and also deleted the folder
includes\modules\payment\square_support

If following the hierarchy of WebPay I assume we do leave this in place.

To sum up - the existing Square plugin should be uninstalled from within Admin and all of its files should be removed with the exception of the square_support folder.

(I don't think a hierarchical removal of the old plugin is strictly correct, if we follow that premise then that would leave the \includes\classes\vendors\square folder behind - which I believe is no longer needed. Perhaps I misunderstand 'hierarchy').

Simon

23 May 2022, 3:19 PM
#116
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Square WebPay support thread.

Actually, doing anything other than clicking on Remove Module in the admin is not recommended.

If you remove files from the current Square installation, you will have problems reviewing sales made with Square when you click on Details.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

23 May 2022, 3:43 PM
#117
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: Square WebPay support thread.

simon1066:

I'm preparing to upgrade Square to WebPay (and OPC) and am catching up with the various posts in this thread and wanted to confirm the following,

I assume we do remove the existing Square plugin by uninstalling it within Admin and removing all of its files? The above post mentions following the hierachy of WebPay, I've not seen this or the removal of files suggested before, perhaps it was in a PM. (I note that WebPay makes use of the existing Square database table, so we would leave that alone)

The installation docs state "If you want to use Square WebPay module, please remove the Square Module". I uninstalled within the Admin, but hadn't deleted the php files which resulted in Square WebPay breaking.
You are correct that the php removal was suggested in a PM. I followed only the Square WebPay hierarchy in removing php files, without touching the database table.

simon1066:

If following the hierarchy of WebPay I assume we do leave this in place.

To sum up - the existing Square plugin should be uninstalled from within Admin and all of its files should be removed with the exception of the square_support folder.

(I don't think a hierarchical removal of the old plugin is strictly correct, if we follow that premise then that would leave the \includes\classes\vendors\square folder behind - which I believe is no longer needed. Perhaps I misunderstand 'hierarchy').

I had to re-load the square_support folder in order to eliminate partial white screen on the "Order Details" pages.

I did leave the \includes\classes\vendors\square folder in my store as I did not see this in the new WebPay hierarchy. I've not seen any issues by leaving this folder in, but I've only had the one sale since my repair.

Can someone else illuminate on leaving or removing folder \includes\classes\vendors\square?

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

23 May 2022, 3:55 PM
#118
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Square WebPay support thread.

There's a difference between Remove and Uninstall. Using the Remove Module option is all that is needed.

Who knows for sure what file(s) may be needed at some time by Square to process/review an order. Don't uninstall. Just Remove.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

23 May 2022, 4:08 PM
#119
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Square WebPay support thread.

dbltoe:

There's a difference between Remove and Uninstall. Using the Remove Module option is all that is needed.

Who knows for sure what file(s) may be needed at some time by Square to process/review an order. Don't uninstall. Just Remove.

I had assumed that the removal of php files was to solve the issue in this post.

Simon

23 May 2022, 4:12 PM
#120
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Square WebPay support thread.

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

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

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com