Zen Cart Logo
Forums / Addon Payment Modules / Square Payment Module for Zen Cart [Support Thread]

Square Payment Module for Zen Cart [Support Thread]

Sticky

Views: 366,769

Results 601 to 620 of 835
8 Jun 2021, 4:14 PM
#601
john_large avatar

john_large

New Zenner

Join Date:
Oct 2015
Location:
Cornwall, UK
Posts:
41
Plugin Contributions:
0

Square Payment Module for Zen Cart [Support Thread]

simon1066:

As I've yet to be asked for any form of 2FA for credit card purchases online I'm not sure how this works. Is the flow something like:

  • customer enters credit card info as usual, click Make Payment (I forget what the button's called).
  • if the issuer requires SCA then a message is displayed saying that a code has been sent to their mobile.
  • the popup shown in post #583 is displayed, asking for the customer to enter their passcode.
  • click 'verfiy now' and the transaction is accepted.

Thats about the size of it. You enter card details on checkout_payment, and if your bank requires active verification, the popup modal will appear and guide you through the code generation (be that code sent via sms, email or soon within online banking apps via notificactions). If you enter the code correctly it will then proceed from checkout payment to checkout_confirmation.

Like contactless payments in shops, many payments go through frictionless and don't actively require user intervention, but this fix allows the modal to appear and the verifictation token to be applied. Square takes care of all of that on their API & with the card issuer, so long as you have these extra code changes to include the token requirements.

8 Jun 2021, 4:34 PM
#602
simon1066 avatar

simon1066

Totally Zenned

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

Re: Square Payment Module for Zen Cart [Support Thread]

Thanks, that's clear.

9 Jun 2021, 4:01 PM
#603
rocketsites avatar

rocketsites

New Zenner

Join Date:
Jun 2013
Location:
United Kingdom
Posts:
41
Plugin Contributions:
4

Re: Square Payment Module for Zen Cart [Support Thread]

John Large:

Thanks so much for the help.

Have just sent a donation using your link. Hope it can help with the fundraising. Will donate some more once our sales pick back up again.

John Large (Kool Badges)

You're a gent, thanks John.

15 Jun 2021, 12:44 PM
#604
mrpix avatar

mrpix

New Zenner

Join Date:
Jun 2021
Location:
UK
Posts:
8
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

RocketSites:

With the assistance of @Congerman, I have made some changes to the Square module with a view to achieving SCA compliance.

The following is ready for TESTING - use AT YOUR OWN RISK. Replace these two core files with those included in the archive:

/includes/modules/pages/checkout_payment/jscript_square.php
/includes/modules/payment/square.php

No need to un-install and then re-install the module in admin, as there are no DB changes.

https://www.rocketsites.co.uk/square.zip

Hi @RocketSites and @Congerman,

I host a small site for my friend here in the UK and we are getting increasing demand for SCA compliance from overseas in particular.

I downloaded the zip file and uploaded/replaced the 2 files from within the site.

I created a product and tried to complete a purchase but the transaction gets stuck on step 2 and clicking on Continue (after entering real debit card data) seems to do nothing.

Can you please help me resolve this, I'm pretty sure it's probably something my end or something I have missed but really have no idea as I do not have any access to the square account as it is not mine.

For the record, I did restore the original 2 files and went through the process again and the Continue button (Step 2 > 3) worked OK (but obviously no SCA).

I am using v1.5.7 of Zencart, don't know if this has any bearing as I know v1.5.7c is available?

Thank you for your time.

18 Jun 2021, 8:33 AM
#605
rocketsites avatar

rocketsites

New Zenner

Join Date:
Jun 2013
Location:
United Kingdom
Posts:
41
Plugin Contributions:
4

Re: Square Payment Module for Zen Cart [Support Thread]

MrPix:

Hi @RocketSites and @Congerman,

I host a small site for my friend here in the UK and we are getting increasing demand for SCA compliance from overseas in particular.

I downloaded the zip file and uploaded/replaced the 2 files from within the site.

I created a product and tried to complete a purchase but the transaction gets stuck on step 2 and clicking on Continue (after entering real debit card data) seems to do nothing.

Can you please help me resolve this, I'm pretty sure it's probably something my end or something I have missed but really have no idea as I do not have any access to the square account as it is not mine.

For the record, I did restore the original 2 files and went through the process again and the Continue button (Step 2 > 3) worked OK (but obviously no SCA).

I am using v1.5.7 of Zencart, don't know if this has any bearing as I know v1.5.7c is available?

Thank you for your time.

Hi,

This sounds like a JS error, could be as simple as a cache issue. Can you provide your website URL and confirm that I can create a customer account to test please?

18 Jun 2021, 12:23 PM
#606
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Square Payment Module for Zen Cart [Support Thread]

MrPix:

Hi @RocketSites and @Congerman,

I host a small site for my friend here in the UK and we are getting increasing demand for SCA compliance from overseas in particular.

I downloaded the zip file and uploaded/replaced the 2 files from within the site.

I created a product and tried to complete a purchase but the transaction gets stuck on step 2 and clicking on Continue (after entering real debit card data) seems to do nothing.

Can you please help me resolve this, I'm pretty sure it's probably something my end or something I have missed but really have no idea as I do not have any access to the square account as it is not mine.

For the record, I did restore the original 2 files and went through the process again and the Continue button (Step 2 > 3) worked OK (but obviously no SCA).

I am using ** v1.5.7** of Zencart, don't know if this has any bearing as I know v1.5.7c is available?

Thank you for your time.
That could be part of the problem; there are significant updates to the core from v1.5.7 to v1.5.7c.

If you go to https://github.com/zencart/zencart/releases and click on the 'Assets' associated with the v1.5.7b and v1.5.7c releases, you'll find zip-files that contain only the changed files (no database changes required) to make the upgrade easier. You'll need to do two updates going from v1.5.7 to v1.5.7c, first from v1.5.7 to v1.5.7b then from v1.5.7b to 1.5.7c.

20 Jun 2021, 6:08 PM
#607
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

If you find the input fields for credit card numbers are flat with no text box to type into, this typically means you're missing the jscript_square.php file as described earlier in the Installation Instructions.

Or you've got a firewall or browser plugin blocking access to Square's javascript code.

Or you've got a plugin having jQuery conflicts.

ZC 1.5.7.c
One Page Checkout
Fluorspar Template
IH5
Backup MySQL

Yep, that flat CC field with no input field is exactly what I have.

For One-Page Checkout to work, you must COPY the jscript_square.php file from /includes/modules/pages/checkout_payment/ into the /includes/modules/pages/checkout_one/ folder. Done and verified

If you had placed extra copies of the jscript_square.php file in other checkout flow locations, re-copy that again using the updated file. (common example would be for the One-Page-Checkout addon, described later in this document) Done and verified.

I have not seen any console errors nor any php errors. I have validated HTTPS was well. What am I missing?

21 Jun 2021, 12:02 PM
#608
rocketsites avatar

rocketsites

New Zenner

Join Date:
Jun 2013
Location:
United Kingdom
Posts:
41
Plugin Contributions:
4

Re: Square Payment Module for Zen Cart [Support Thread]

g2ktcf:

ZC 1.5.7.c
One Page Checkout
Fluorspar Template
IH5
Backup MySQL

Yep, that flat CC field with no input field is exactly what I have.

Done and verified

Done and verified.

I have not seen any console errors nor any php errors. I have validated HTTPS was well. What am I missing?

What's your storefront URL please? Feel free to PM if preferred.

21 Jun 2021, 3:35 PM
#609
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

I am testing this one an older store so do not let the URL fool you. radiant-holidays.com/Test. This is not the live store.

22 Jun 2021, 4:05 AM
#610
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

Hello,
sometimes I get an error mail when a customer wants to pay by Square:

Error Dump: stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[code] => VALUE_EMPTY
[detail] => Field must not be blank
[field] => source_id
[category] => INVALID_REQUEST_ERROR
)

        [1] => stdClass Object
            (
                [code] => VALUE_EMPTY
                [detail] => Field must not be blank
                [field] => idempotency_key
                [category] => INVALID_REQUEST_ERROR
            )


        [2] => stdClass Object
            (
                [code] => MISSING_REQUIRED_PARAMETER
                [detail] => Field must be set
                [field] => amount_money
                [category] => INVALID_REQUEST_ERROR
            )

)
)

I can not find out what the reason is. Minutes before and after people paid successfully.
Zen Cart version 1.5.5f
Square module: 1.5
php-version 7.3.28

22 Jun 2021, 12:41 PM
#611
rocketsites avatar

rocketsites

New Zenner

Join Date:
Jun 2013
Location:
United Kingdom
Posts:
41
Plugin Contributions:
4

Re: Square Payment Module for Zen Cart [Support Thread]

g2ktcf:

I am testing this one an older store so do not let the URL fool you. radiant-holidays.com/Test. This is not the live store.

Thanks.

Looks like you're using the standard Square module, and it appears that the issue only occurs after the order total changes (e.g. after changing the shipping method) - correct?

22 Jun 2021, 12:42 PM
#612
rocketsites avatar

rocketsites

New Zenner

Join Date:
Jun 2013
Location:
United Kingdom
Posts:
41
Plugin Contributions:
4

Re: Square Payment Module for Zen Cart [Support Thread]

todoonada:

Hello,
sometimes I get an error mail when a customer wants to pay by Square:

Error Dump: stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[code] => VALUE_EMPTY
[detail] => Field must not be blank
[field] => source_id
[category] => INVALID_REQUEST_ERROR
)

        [1] => stdClass Object
            (
                [code] => VALUE_EMPTY
                [detail] => Field must not be blank
                [field] => idempotency_key
                [category] => INVALID_REQUEST_ERROR
            )


        [2] => stdClass Object
            (
                [code] => MISSING_REQUIRED_PARAMETER
                [detail] => Field must be set
                [field] => amount_money
                [category] => INVALID_REQUEST_ERROR
            )

)
)

I can not find out what the reason is. Minutes before and after people paid successfully.
Zen Cart version 1.5.5f
Square module: 1.5
php-version 7.3.28

Are these definitely triggered by payment attempts? Looking at the core code, amount_money is only used during refunds.

22 Jun 2021, 3:06 PM
#613
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

I do not remember ever seeing the fields there. Now that I think about it, I do not know if I ever created a cart from scratch after installing the module. I will go back and test that. Be advised that this site is running in a subdirectory of the .com url and we have seen some issues with that from other plugins.

23 Jun 2021, 1:15 AM
#614
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

RocketSites:

Are these definitely triggered by payment attempts? Looking at the core code, amount_money is only used during refunds.

Yes, they are triggered by payment attempts. I followed the customer on "Who's online" and saw the on the payment site. Then they went to checkout_confirmation and I received the mail the error. Then customer went to the payment site again and same error happens.

23 Jun 2021, 10:59 AM
#615
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

RocketSites:

Thanks.

Looks like you're using the standard Square module, and it appears that the issue only occurs after the order total changes (e.g. after changing the shipping method) - correct?

You are correct. I logged back in as the customer, emptied the cart. Then added a different item and went to checkout. The fields were there. Once I clicked the shipping type, the fields went away.

25 Jun 2021, 3:42 AM
#616
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

todoonada:

Hello,
sometimes I get an error mail when a customer wants to pay by Square:

Error Dump: stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[code] => VALUE_EMPTY
[detail] => Field must not be blank
[field] => source_id
[category] => INVALID_REQUEST_ERROR
)

        [1] => stdClass Object
            (
                [code] => VALUE_EMPTY
                [detail] => Field must not be blank
                [field] => idempotency_key
                [category] => INVALID_REQUEST_ERROR
            )


        [2] => stdClass Object
            (
                [code] => MISSING_REQUIRED_PARAMETER
                [detail] => Field must be set
                [field] => amount_money
                [category] => INVALID_REQUEST_ERROR
            )

)
)

I can not find out what the reason is. Minutes before and after people paid successfully.
Zen Cart version 1.5.5f
Square module: 1.5
php-version 7.3.28

I got another error now.

[errors] => Array ( [0] => stdClass Object ( [code] => INVALID_ACCOUNT [detail] => Authorization error: 'INVALID_ACCOUNT' [category] => PAYMENT_METHOD_ERROR ) )

The same customer ordered the day before without any problem.

25 Jun 2021, 12:26 PM
#617
mrpix avatar

mrpix

New Zenner

Join Date:
Jun 2021
Location:
UK
Posts:
8
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

lat9:

That could be part of the problem; there are significant updates to the core from v1.5.7 to v1.5.7c.

If you go to https://github.com/zencart/zencart/releases and click on the 'Assets' associated with the v1.5.7b and v1.5.7c releases, you'll find zip-files that contain only the changed files (no database changes required) to make the upgrade easier. You'll need to do two updates going from v1.5.7 to v1.5.7c, first from v1.5.7 to v1.5.7b then from v1.5.7b to 1.5.7c.

Thanks for the info, new to Zencart and not had to do any updates yet.

I did try to update, but after uploading the 1.5.7>1.5.7b files (after renaming the admin folder) I just get a blank screen (admin only) so I need to work out what needs to happen to rectify that I guess before proceeding.

I'll be in touch once I've worked the update(s) out and tested it with the new files.

26 Jun 2021, 1:35 PM
#618
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

RocketSites:

Thanks.

Looks like you're using the standard Square module, and it appears that the issue only occurs after the order total changes (e.g. after changing the shipping method) - correct?

Okay, so first off, I move the site from https://www.example.com/test to a https://www.example.com as there were several smaller issues that were driving me nuts. That move solved many of the nagging issues. However, this one is now reproducible at https://www.wlcartistrydesign.com. I have gone into the Chrome Developer console to get the CC field info AFTER selecting the shipping method. The CC fields were visible (although not in a visually appealing way.) Here is the data in the console for the elements.
Attachment 19652

Notice that all the div IDs have no content...

When I go back and ADD an item, the fields are back...

Attachment 19653

What is going on here?

Here is the element details when the fields are visible. Completely different that the first time.

Attachment 19654

26 Jun 2021, 2:33 PM
#619
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

Sorry to bomb this thread with info today. Further testing has revealed more details. I spent the last hour working on my shipping modules. I have finally decided to stay with a straight up Table Shipping model. Once I got that configured, there is only one shipping method showing and it is auto selected. Now the CC fields show with the shipping method enabled. HOWEVER, if I click on that auto selected shipping radio button, all those fields instantly disappear.

1 Jul 2021, 5:17 PM
#620
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Square Payment Module for Zen Cart [Support Thread]

Several of our customers use their ZC as an online catalog of their products with 90+% of their business being face to face versus online.

They are traveling booths that do state fairs, rodeos, home shows, etc. Most online sales happen within days after the store owner has had their booth set up at one of those events. Someone liked an item and decided later to get it is the usual scenario behind the purchase.

Due to the pandemic, many of those have not had face to face with any customer for over a year.

One such customer got an e-mail today that there was a critical error with the module.

This is an alert from your Zen Cart store.

Your Square Payment Module access-token has expired, or cannot be refreshed automatically. Please login to your store Admin, go to the Payment Module settings, click on the Square module, and click the button to Re/Authorize your account.

Square Payments are disabled until a new valid token can be established.

The token expired on 2021-04-23T16:02:17Z
That was a long time ago. Over 90 days. But, it is not uncommon for this store to go over 90 days between orders.

If memory serves me correctly, the need for a cron job to maintain the connection to Square was eliminated with the latest version of this mod. (using 1.5)

Is that true still? Why did the error notice not arrive until a customer attempted to check out? Which system recorded the expiration? If ZC, why did the store owner not receive any notice? Debug is set to log and e-mail on failures. If the date came from Square, is there some way to have them let the store owner know when the token expires?

I realize the last is a question for the Square folks but, I need to gather more information before a fight past the script-reader who keeps telling me we need to use their website and gateway.

Is there some debug setting that will allow the token expiration to trigger the log and e-mail at the time it happens versus when someone tries to checkout later?