Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
Gamethrall
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
Code:
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.
If you look in your browser's Console errors, you'll see:
You need to fix your HTTPS (SSL) on your site. It's currently redirecting away from https to just http URLs. Maybe just edit your configure.php and make both the HTTP_SERVER and HTTPS_SERVER urls begin with "https://...." instead of both being http://
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
DrByte
If you look in your browser's Console errors, you'll see:
You need to fix your HTTPS (SSL) on your site. It's currently redirecting away from https to just http URLs. Maybe just edit your configure.php and make both the HTTP_SERVER and HTTPS_SERVER urls begin with "https://...." instead of both being http://
That was it! I changed both files and I can enter cc numbers!
Thanks again, DrByte!
Re: Square Payment Module for Zen Cart [Support Thread]
I'm a newbie and this is exactly what I'm coming up against. Where do I find the configure.php that you reference?
Re: Square Payment Module for Zen Cart [Support Thread]
I located and changed both configure.php files and that worked! Thanks Dr. Byte and Gamethrall!
1 Attachment(s)
Re: Square Payment Module for Zen Cart [Support Thread]
I have now successfully configured Square as a payment option. However, there is no logo or text identifying that Square is the processor. I've attached a screenshot from Step 2 of 3 - Payment Information. www.kaylieskandles.com
Attachment 17804
Re: Square Payment Module for Zen Cart [Support Thread]
Here's one way to add an image:
In \includes\languages\english\modules\payment\YOUR_TEMPLATE\square.php you can edit
Code:
define('MODULE_PAYMENT_SQUARE_TEXT_CATALOG_TITLE', 'Credit Card'); // Payment option title as displayed to the customer
to a description of your choice.
If you want an icon there instead change it to
Code:
define('MODULE_PAYMENT_SQUARE_TEXT_CATALOG_TITLE', '<img class="spIcon" alt="credit card" title="Secure payments with Square SSL" src="images/AN_IMAGE.png" />'); // Payment option title as displayed to the customer
replace AN_IMAGE with a credit card image of your choosing, and you can position the image by adding the spIcon class to your stylesheet.
Re: Square Payment Module for Zen Cart [Support Thread]
Zen Cart version: 1.5.5f
Plugin version: 0.91
Template used: Fidelity
When I try to go through the checkout process, on Step 2, Payment Information, I receive the following error:
"We could not initiate your transaction because of a problem with the card data you entered. Please correct the card data, or report this error to the Store Owner: SQ-NONCE-FAILURE"
I've been through the FAQ which suggests
"The module expects the checkout page to have a <form> element with a name='checkout_payment' in it."
I've checked the HTML and there is a form that has the name "checkout_payment."
It also suggets making sure that jscript_framework.php has been copied to /includes/templates/YOUR_TEMPLATE_FOLDER/jscript (yes, I've copied it to my template folder, not YOUR_TEMPLATE_FOLDER). I copied the file there myself.
It works well under the Responsive Classic Template, so obviously there's an issue in the Fidelity template.
Any suggestions?
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
Gamethrall
It works well under the Responsive Classic Template, so obviously there's an issue in the Fidelity template.
Whether it's a general problem with that template or just with whatever javascript the template uses and/or javascript you've added, if there are any javascript errors on the checkout pages, the Square code won't be able to do its task, and therefore it won't receive a NONCE, and therefore it can't complete a payment.
Fix your javascript errors/conflicts. See the browser's javascript console for details.
Re: Square Payment Module for Zen Cart [Support Thread]
I'm seeing the following error in the logs after an attempt to use Square.
PHP Warning: Illegal string offset 'id' in /home/devsite/public_html/includes/modules/payment/square.php on line 142
The module code hasn't been edited in any way.
Site is a clean install of 1.5.5f
Server is running PHP Version: 5.6.35 (Zend: 2.6.0). It was on PHP 7.1.12, but I switched to an older PHP version to see if it cleared the issue. No change.
I checked the array key is wrapped in quotes, and it is.
$sql = "SELECT zone_id FROM " . TABLE_ZONES_TO_GEO_ZONES . " WHERE geo_zone_id = '" . (int)MODULE_PAYMENT_SQUARE_ZONE . "' AND zone_country_id = '" . (int)$order->billing['country']['id'] . "' ORDER BY zone_id";
Any suggestions?
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
strelitzia
I'm seeing the following error in the logs after an attempt to use Square.
PHP Warning: Illegal string offset 'id' in /home/devsite/public_html/includes/modules/payment/square.php on line 142
The module code hasn't been edited in any way.
Site is a clean install of 1.5.5f
Server is running PHP Version: 5.6.35 (Zend: 2.6.0). It was on PHP 7.1.12, but I switched to an older PHP version to see if it cleared the issue. No change.
I checked the array key is wrapped in quotes, and it is.
$sql = "SELECT zone_id FROM " . TABLE_ZONES_TO_GEO_ZONES . " WHERE geo_zone_id = '" . (int)MODULE_PAYMENT_SQUARE_ZONE . "' AND zone_country_id = '" . (int)$order->billing['country']['id'] . "' ORDER BY zone_id";
Any suggestions?
That's essentially saying that $order->billing['country']['id'] doesn't exist, which suggests that $order->billing['country'] isn't defined as an array ... which suggests something's amuck with the address, which suggests that either the customer is connected to an invalid address (ie: a prior address_book entry that no longer has a corresponding country record), or your order class isn't populating the country data properly when passing it to the module. You didn't say whether this was triggered by a customer purchase or if it was from an Admin attempt to look up an order paid by Square.
Lots of moving parts.
It's only a Warning, so isn't causing a fatal/crash (blank page) situation.
Can you shed more light on the actual transaction and why the country data wouldn't be set properly when that Warning was generated?