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

Square WebPay support thread.

Views: 128,128

Results 541 to 560 of 800
09 Oct 2023, 14:42
#541
mprough avatar

mprough

Totally Zenned

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

Square WebPay support thread.

carlwhat:

look back at this post.

//from
if ($response['errors']) {
//to
if ($response['error']) {

> 
> TSIS.

That worked perfect, thank you =)
12 Oct 2023, 12:07
#542
bscho avatar

bscho

Zen Follower

Join Date:
Jul 2016
Location:
London
Posts:
259
Plugin Contributions:
0

Re: Square WebPay support thread.

Have it working now with webpay

the square would not work for me.

18 Oct 2023, 12:16
#543
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Re: Square WebPay support thread.

Has anyone here managed to get Apple Pay to work via the Square Web Pay plugin. On Square's developer site it seems to say that as well as verifying the domain we need to add some code to certain pages on our site.

Can anyone help with this as ApplePay seems to be getting quite popular.

Thanks as always

Step 2: Attach Apple Pay to the page
The Apple Pay payment method needs information about the buyer and the payment amount before it can open the Apple Pay sheet. Your application creates a PaymentRequest object to provide that information and then gets a new ApplePay object initialized with it.

The following code creates the payment request and attaches the ApplePay method to the page:

Add an HTML element to the prerequisite walkthrough form with an ID of apple-pay-button. The HTML for the body of index.html should look like the following:

<form id="payment-form"> <!-- Add the below element --> <div id="apple-pay-button"></div> <div id="card-container"></div> <button id="card-button" type="button">Pay $1.00</button> </form> <div id="payment-status-container"></div> Add a style element and button style properties in the <head> tag. For a reference of Apple Pay button styles, see Styling the Apple Pay Button Using CSS.

Add the following functions to the script tag:

function buildPaymentRequest(payments) {
return payments.paymentRequest({
countryCode: 'US',
currencyCode: 'USD',
total: {
amount: '1.00',
label: 'Total',
},
});
}

async function initializeApplePay(payments) {
const paymentRequest = buildPaymentRequest(payments)
const applePay = await payments.applePay(paymentRequest);
// Note: You don't need to attach applePay.
return applePay;
}

In the DOMContentLoaded event listener, add the following code after you initialize the ApplePay method:

let applePay;
try {
applePay = await initializeApplePay(payments);
} catch (e) {
console.error('Initializing Apple Pay failed', e);
// There are a number of reason why Apple Pay might not be supported.
// (such as Browser Support, Device Support, Account). Therefore you should
// handle
// initialization failures, while still loading other applicable payment
// methods.
}

20 Oct 2023, 07:34
#544
wtfbbq avatar

wtfbbq

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: Square WebPay support thread.

I'm encountering a problem since my upgrade to 1.5.8a from 1.5.7
PHP Version: 7.4.33 (host wont upgrade to 8.X, moving hosts next month)
Refreshed token, everything is green on the admin of square webpay module.

When a customer completes and pays for an order, the order in admin says this at the top.
"The configuration of the order's payment module (square_webPay) has changed. No refunds, auths, captures or voids can be done for this order."
Order comes through but payment is basically DOA, module is set for authorization but can't capture,void, or do anything.
What could be causing this error?

20 Oct 2023, 20:37
#545
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

wtfbbq:

I'm encountering a problem since my upgrade to 1.5.8a from 1.5.7
PHP Version: 7.4.33 (host wont upgrade to 8.X, moving hosts next month)
Refreshed token, everything is green on the admin of square webpay module.

When a customer completes and pays for an order, the order in admin says this at the top.
"The configuration of the order's payment module (square_webPay) has changed. No refunds, auths, captures or voids can be done for this order."
Order comes through but payment is basically DOA, module is set for authorization but can't capture,void, or do anything.
What could be causing this error?

you need to look at the code right here:

https://github.com/zencart/zencart/blob/3db8d527910b7fc0f0fb9e2f722833cb9d973d79/admin/orders.php#L517-L520

specifically line 518. one of those 3 conditionals is failing.

it works fine on my test system. not sure what could be causing that.

20 Oct 2023, 23:38
#546
wtfbbq avatar

wtfbbq

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: Square WebPay support thread.

line 518 from 1.5.8 admin/orders.php is exactly the same as the github code.
Interesting enough, I rolled the 1.5.7d admin/orders.php file back and it works again.
What else should I look for?

27 Oct 2023, 11:13
#547
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Re: Square WebPay support thread.

Can anyone please help with this?

Congerman:

Has anyone here managed to get Apple Pay to work via the Square Web Pay plugin. On Square's developer site it seems to say that as well as verifying the domain we need to add some code to certain pages on our site.

Can anyone help with this as ApplePay seems to be getting quite popular.

Thanks as always

}

31 Oct 2023, 11:55
#549
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Re: Square WebPay support thread.

dbltoe:

This may help. Let us know if it works for you.
https://developer.squareup.com/docs/web-payments/apple-pay

Yup, that is what I looked at. Spoke to Square to see where to put that extra code and they said it would need to be sorted in the Zen Cart plugin

"This is Cris from Square Customer Success.

Regarding your query about integrating Apple Pay with Zen Cart. Although Square integrates with Zen Cart to process payments, all API functions are operated and managed by them directly. For help with Zen Cart specific questions, you’ll need to contact their Support Team."

01 Dec 2023, 14:21
#550
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Re: Square WebPay support thread.

swguy:

@carlwhat please write up some copy that explains how to get the updated integration, and I'll put it on the help page. People need to understand that there is an upgrade path.
Has anything been done yet on describing how to update the SDK used in the Square Webpay module? Our webhost will be forcing a minimum of php 8.1 soon and I'd really like to get to 8.2 or above.
Thank You!
Dave
working on upgrade to zc158a

01 Dec 2023, 16:26
#551
balihr avatar

balihr

Totally Zenned

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

Re: Square WebPay support thread.

Dave224:

Has anything been done yet on describing how to update the SDK used in the Square Webpay module? Our webhost will be forcing a minimum of php 8.1 soon and I'd really like to get to 8.2 or above.
Thank You!
Dave
working on upgrade to zc158a

I really hate jumping into such questions, but I'll make an exception this time.
Updating the SDK is not a 2-3 line difference, especially not with payment plugins which are IMHO the most critical part of a store - you're handling very sensitive information and there's no margin for error in this step.

There is a version available with a newer SDK which works on php 8.1 (and 8.2). carlwhat was generous enough to share the plugin that worked in most cases for quite a long time and has so patiently provided support for it. If you really need an updated version, you can show some author support and buy the newer version of the plugin from the same person who shared the free version at a more-than-reasonable price... Or, as an alternative, dig in and read the docs provided by Square and release an updated version... :wink2:

02 Dec 2023, 08:41
#552
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Square WebPay support thread.

I can second that as I've been running the the mentioned version on php 8.1 all year without any issues. Look in @carlwhat's signature.

11 Dec 2023, 13:31
#553
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: Square WebPay support thread.

Hi All,

Just made my site live and have an issue with square which is that it puts in two payments on an order and when I click to delete a payment I get this error message:
Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, bool given in /home/xxxx/outdoorking.com.au/xxxx/super_payments.php:456 Stack trace: #0 /home/xxxx/outdoorking.com.au/xxxxx/index.php(11): require() #1 {main} thrown in /home/xxxx/outdoorking.com.au/xxxx/super_payments.php on line 456

The transaction are going through ok.

Any assistance would be a great help.

11 Dec 2023, 14:31
#554
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

Bruce1952:

Hi All,

Just made my site live and have an issue with square which is that it puts in two payments on an order and when I click to delete a payment I get this error message:
Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, bool given in /home/xxxx/outdoorking.com.au/xxxx/super_payments.php:456 Stack trace: #0 /home/xxxx/outdoorking.com.au/xxxxx/index.php(11): require() #1 {main} thrown in /home/xxxx/outdoorking.com.au/xxxx/super_payments.php on line 456

The transaction are going through ok.

Any assistance would be a great help.

super payments is not part of this module.

deleting a payment is not part of this module. one can potentially void a payment or refund it.

i would suggest contacting from whomever you got the super payments script.

best.

12 Dec 2023, 12:27
#555
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: Square WebPay support thread.

It appears that it is from super orders here: https://www.zen-cart.com/downloads.php?do=file&id=155

Would this be a conflict with Square Webpay because it has an sql script.

Should I uninstall the super orders module?

28 Dec 2023, 06:46
#556
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
284
Plugin Contributions:
1

Re: Square WebPay support thread.

Occasionally I get a complaint from a customer that they were unable to make a payment - and my zencart is showing them this error -

Your transaction could not be completed due to a misconfiguration in our store. Please report this error to the Store Owner: SQ-MISCONF

Checking the relevant myDEBUG file it's getting triggered by the square_webPay module at line 235 -

           trigger_error('missing token result: ' . json_encode($_REQUEST));

So why does a customer on the odd occasion have a missing token? And is there anything I can do to resolve this?

28 Dec 2023, 15:39
#557
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

royaldave:

...

So why does a customer on the odd occasion have a missing token? And is there anything I can do to resolve this?

there are plenty of posts on this issue.

in addition, according to my records, that specific error message was changed ~19 months ago.

your customer does not have javascript enabled on the browser he is using to purchase your product.

i would suggest updating to the latest version. and buying your customer a new computer...

best.

02 Jan 2024, 08:17
#558
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
284
Plugin Contributions:
1

Re: Square WebPay support thread.

carlwhat:

there are plenty of posts on this issue.

in addition, according to my records, that specific error message was changed ~19 months ago.

your customer does not have javascript enabled on the browser he is using to purchase your product.

i would suggest updating to the latest version. and buying your customer a new computer...

best.

The new computer comment seems about right. I'm yet to hear back from my customer - however I do know they were using safari, and I found a comment online about square SDK not working with versions 11 and under.
I was able to replicate the error using testingbot.

05 Jan 2024, 02:59
#559
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
284
Plugin Contributions:
1

Re: Square WebPay support thread.

royaldave:

The new computer comment seems about right. I'm yet to hear back from my customer - however I do know they were using safari, and I found a comment online about square SDK not working with versions 11 and under.
I was able to replicate the error using testingbot.

My customer insists they have latest IOS, safari and chrome versions - the payment wouldn't work on safari or chrome.
Is there some apple setting that might cause this - I am totally not an apple person and wouldn't have a clue where to begin looking.

18 Jan 2024, 00:59
#560
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

royaldave:

....I was able to replicate the error using testingbot.

as i stated somewhere above, you need to be on the latest version of this module.

in addition, i am not sure what your testingbot does, or how it does it. for all i know, your testingbot disables javascript, and then is able to reproduce the error.

unfortunately, there is nothing i can do about that. this version of square makes use of javascript. if javascript is disabled, it will not work.

if however, you are able to provide some reproducible circumstances that your testingbot created with javascript enabled, please post them. i would be interested.

royaldave:

My customer insists they have latest IOS, safari and chrome versions - the payment wouldn't work on safari or chrome.
Is there some apple setting that might cause this - I am totally not an apple person and wouldn't have a clue where to begin looking.

i think you are selling yourself short here; i would try a google search to see how to disable javascript on an apple.

as i have previously stated, i have zero customers using square. but i did set up a test site on the internet and spun up my apple laptop. it is running:

Sonoma 14.2.1 (23C71)

which i believe is reasonably current. i was then able to place an order using chrome and safari. those browser versions were:

Chrome is up to date
Version 120.0.6099.234 (Official Build) (arm64)

safari
Version 17.2.1 (19617.1.17.11.12)

you have numerous customers placing orders successfully; some can not. one customer insists everything on his computer is current and yet can not place an order. as i previously stated, i do believe the problem lies there, and not with this code. but feel free to add something new. code does have bugs, and can always be improved.

best.