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,731

Results 101 to 120 of 835
10 Jan 2018, 1:57 AM
#101
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Square Payment Module for Zen Cart [Support Thread]

DrByte:

That error occurred when the customer attempted a payment which was declined, exactly as the message says.

You said that an order came through later, so most likely the customer chose a different credit card to complete their purchase.

Ok. Weird looking email though. I'm still new at using the module, so let me understand. When a CC card is denied, then the customer cannot checkout. So he sees whatever notification this module throws in his screen saying his CC was denied whatever and to enter another CC and I get this weirdly configured email, correct?

Is this a normal email notification for this event or can/should the email look different?

10 Jan 2018, 3:27 AM
#102
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

It's "normal" insomuch as you have the module's Logging settings set to "Email on Failures".
The case of a "declined card" is only one sort of "failure". More critical failures are actual errors which might be reported if something technically goes wrong.

And, yes, if the card is rejected, the customer gets taken back to the payment screen and is asked to use a different card.
Try it out: go through checkout and put in a fake card number like 4242424242424242 with any expiry date and any CVV code. You'll see exactly what the customer sees if their card is refused. It's good to experience that so you know what they face.

10 Jan 2018, 5:40 PM
#103
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

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

DrByte:

It's "normal" insomuch as you have the module's Logging settings set to "Email on Failures".
The case of a "declined card" is only one sort of "failure". More critical failures are actual errors which might be reported if something technically goes wrong.

And, yes, if the card is rejected, the customer gets taken back to the payment screen and is asked to use a different card.
Try it out: go through checkout and put in a fake card number like 4242424242424242 with any expiry date and any CVV code. You'll see exactly what the customer sees if their card is refused. It's good to experience that so you know what they face.

Thank you DrByte.
Actually the setting was on "Log Always and Email on Failures". Email on Failures doesn't seem to send anything when I test with a fake CC. I'm guessing that email is sent if the CC actually gets denied instead of by entering the wrong CC number(?).

Thank you for the help.

24 Jan 2018, 5:20 PM
#104
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]

ZC v1.5.5e
Square v0.90

On a low traffic site I have set up a cron job to run every few days so to refresh the Square access token. A recent purchase failed to complete as the token had expired, it must have been more than 45 days between orders. Looking further into the cron which is

php /home/mywebsite/public_html/square_handler.php

I get 'No output generated' if I run the cron from within my hosting control panel (I should have done that when I first set it up). I've checked file permissions - 644 (read for all and write for owner) and owner/group (I'm running the cron as root), there's nothing in the cron logs. Not sure where else to look.

Edit,
Thinking about it a bit more, the problem may lie with the way my host runs php cron jobs, I use Virtualmin on a VPS, I'll look into it.

24 Jan 2018, 5:31 PM
#105
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

Once you have v0.90 installed (all the files updated), after your token expires you need to re-activate it once, using the normal process of:

Go to the Square module in your Admin->Modules->Payment, click on Square. There you will see a button to authorize a token. Click it: it will take you to the Square site to login there (if not already logged in to Square), and then redirect back to your site.
At this point, if you have v0.91 or newer installed, it will auto-refresh your store's admin page. otherwise you'll need to click Refresh (or F5) to reload the screen. You'll see that the button goes away. At this point your module is re-authorized, and things should work normally. Including the cron script.

31 Jan 2018, 9:03 PM
#106
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

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

I'm a little confused about the new inclusion of Square payment module in zc 1.5.5F. In comparing the Square files from a clean copy of ZC 1.5.5F with the module I installed recently for a client on 1.5.5E (I am in the process of upgrading him) I can't tell which version is most current. For example in the file: includes/modules/payment/square.php I see these differences in the header info:

v155E - @version $Id: Author: Chris Brown [email protected] New in v1.5.6 $
v155F - @version $Id: Author: Chris Brown [email protected] New in v1.5.5f $

This would make it seem like the current version installed on the 155E shop is more current the version included with build 155F

But then there is also this:

v155E - Integrated using SquareConnect PHP SDK v2.5.1
v155F - Integrated using SquareConnect PHP SDK v2.2.1

These lines seem to indicate that the square module included in v155F is newer than the stand alone module I added to my client's shop a few months ago.

Can someone in the know clarify which version is newest and preferred to use?

Thanks!

31 Jan 2018, 9:05 PM
#107
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

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

Just to clarify my question above, I'm trying to determine whether to leave the square module files as is in the client's shop or update them with the 155F upgrade.

Sorry if the above wasn't clear. :)

1 Feb 2018, 7:08 PM
#108
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

I'm coming back to the issue of "Access token needed" disused before in this thread.
Using Zen Cart 1.5.4 - PHP 5.4.23
Tried reinstalling module, reissuing Application Secret and Personal Access Token, to no avail. "Access token needed" doesn't go away.
I can see that "Token set. You may now continue configuring the module" message appears when trying to authorize the account, but nothing happens after.
One detail is that if I edit the module there is no Location Id (appears blank).
What am I doing wrong?
Thank you.

2 Feb 2018, 3:48 AM
#110
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

@RobRiv,
Which version of the Square module do you have installed? (It should say in the top of the right-hand-sidebar.)

If the "access token needed" won't go away, even after pressing Refresh in your browser, it suggests that Square isn't able to reach the square_handler.php file on your server in order to set the new access token. This can happen if there is no SSL (https) on your site. It can also happen if you've got URL-rewriting happening that's intercepting the incoming request.

2 Feb 2018, 4:26 PM
#111
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

Thank you Dr.Byte for your replay.
Square Payments Module 0.90
I believe that Square is able to set the new access token (I can see that "Token set. You may now continue configuring the module" message is displayed) however I don't know if square_handler.php is changed.
Could it be because the site only is SSL secured at log-in/registration (not the full site)?
Thank you again.

9 Feb 2018, 4:18 PM
#112
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

DrByte:

@RobRiv,
Which version of the Square module do you have installed? (It should say in the top of the right-hand-sidebar.)

If the "access token needed" won't go away, even after pressing Refresh in your browser, it suggests that Square isn't able to reach the square_handler.php file on your server in order to set the new access token. This can happen if there is no SSL (https) on your site. It can also happen if you've got URL-rewriting happening that's intercepting the incoming request.

@DrByte
Could it be because the site only is SSL secured at log-in/registration (not the full site)?
Thank you again.

13 Mar 2018, 3:38 PM
#113
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

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

We've been using square for a few months now, and so far so good on the web end accepting card payments. On our square dashboard however all transactions appear as unknown, meaning no customer is created at all, no card is tied to the customer, etc, which presents a set of problems in trying to match the purchases with the clients, adding or swapping products to already placed orders and charging the corresponding credit card, etc. It was my understanding the client information was captured and stored in square's dashboard during the processing of the card, but it's not so.

Could you clarify how the capturing of the payment is done in terms of storing the customer's info directly on square dashboard?

Thank you.

13 Mar 2018, 8:14 PM
#114
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

Trying to have this module working.
After following all instructions still "Access token needed" doesn't go away.
Looked at log and have the following message: "PHP Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set"
No idea how to fix this. Anyone?
Thks.

15 Mar 2018, 6:05 PM
#115
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

mvstudio:

We've been using square for a few months now, and so far so good on the web end accepting card payments. On our square dashboard however all transactions appear as unknown, meaning no customer is created at all, no card is tied to the customer, etc, which presents a set of problems in trying to match the purchases with the clients, adding or swapping products to already placed orders and charging the corresponding credit card, etc. It was my understanding the client information was captured and stored in square's dashboard during the processing of the card, but it's not so.

Could you clarify how the capturing of the payment is done in terms of storing the customer's info directly on square dashboard?
At the present time, in v0.9 of the module, there is no creation of customers into your Square account.
I had thought that the transaction-id was available in both places though. Hmmm...

15 Mar 2018, 6:39 PM
#116
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

RobRiv:

Looked at log and have the following message: "PHP Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set"
Not sure why hundreds of others using Square aren't complaining of the same issue.

Most hosts who set the open_basedir parameter are doing it for security reasons, so I doubt your host will change that for you.
As an alternative you could alter the PHP code by adding // as shown here:

/includes/modules/payment/square.php, lines 521 and 625:```
[B]//[/B] curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

16 Mar 2018, 6:26 PM
#117
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

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

DrByte:

At the present time, in v0.9 of the module, there is no creation of customers into your Square account.
I had thought that the transaction-id was available in both places though. Hmmm...

Unless I'm missing something, no, the transaction ID is not in both places, nor I have found a way to search for it in our square dashboard. We can only refund the customer, but cannot adjust orders up if needed.

Would the creation of the customer in full with the CC number, and Apple Pay be included in future versions of the plugin?

Thank you.

19 Mar 2018, 7:36 PM
#118
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

DrByte:

Not sure why hundreds of others using Square aren't complaining of the same issue.

Most hosts who set the open_basedir parameter are doing it for security reasons, so I doubt your host will change that for you.
As an alternative you could alter the PHP code by adding // as shown here:

/includes/modules/payment/square.php, lines 521 and 625:```
[B]//[/B] curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);


Thank you DrByte.
Made changes to square.php as indicated and curl_ error no longer appears. Still however, "Access token needed" doesn't go away.
I noticed that you commented lines 521 and 625; in my version of square.php lines are 540 and 602; may be there is something affecting there? 
Version is latest from plugins (V.9).
Thanks again
22 Mar 2018, 3:10 AM
#119
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

RobRiv:

Thank you DrByte.
Made changes to square.php as indicated and curl_ error no longer appears. Still however, "Access token needed" doesn't go away.
Hmmm

RobRiv:

I noticed that you commented lines 521 and 625; in my version of square.php lines are 540 and 602; may be there is something affecting there?
Version is latest from plugins (V.9).
I think I was quoting from v0.91 which is built-in to v1.5.5f
I don't have my tools with me to do a proper comparison at the moment, so I can't speak to whether any differences are significant in your case.

15 Apr 2018, 9:29 PM
#120
gamethrall avatar

gamethrall

New Zenner

Join Date:
Aug 2016
Posts:
20
Plugin Contributions:
0

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

Zen Cart version: 1.5.5f
Plugin version: 0.91 and 0.90
Template used: Fidelity
Issue: unable to enter credit card information, there are no fields to type in

I looked at the FAQ, which says

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.

I am not missing the "jscript_square.php" file. It is in the correct location as per the PHP Files section of the Square Payments for Zen Cart page.

I ran it in an incognito tab (no browser plugins) and on my mobile phone with wireless turned off (no firewall).

I do not see any indication of jQuery conflicts.

I switched to the Responsive Classic template and the Classic Contemporary Green template and experienced the same issue.

Not realizing until the last post that 0.91 is included with 1.5.5f, I downloaded and uploaded the files for 0.90 and saw the same behavior.

I know a lot of other people have this installed and working without issue. What am I doing wrong? If you want to see it, the site is https://www.yaybeads.biz.