Re: Square Payment Module for Zen Cart [Support Thread]
Just to add another confirm with details for Google:
Had the Square "Access Token" issue described in prior posts. Page showed an HTTP 417 error.
Access Token was not updated in the database.
Applied fix mentioned in Post 264:
https://www.zen-cart.com/showthread....87#post1355387
Issue resolved.
Re: Square Payment Module for Zen Cart [Support Thread]
having trouble figuring out how to fix the SQ-NONCE-FAILURE error when trying to process CC via Square.
helmet-decals.com
I have 3 errors (2 are "ReferenceError: Can't find variable: $" with index.php line references - lines 198 and 287). The other is "Failed to load resource: the server responded with a status of 404 (Not Found)" referencing https://helmet-decals.com/includes/t.../sb_header.png. (which doesn't exist)
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
helmetdecals
having trouble figuring out how to fix the SQ-NONCE-FAILURE error when trying to process CC via Square.
helmet-decals.com
I have 3 errors (2 are "ReferenceError: Can't find variable: $" with index.php line references - lines 198 and 287). The other is "Failed to load resource: the server responded with a status of 404 (Not Found)" referencing
https://helmet-decals.com/includes/t.../sb_header.png. (which doesn't exist)
Did you apply the changes that @DrByte suggested in post #264 of this support-thread?
Re: Square Payment Module for Zen Cart [Support Thread]
I am using the Zencart_zen template. it works in the templates that come with Zen-Cart
Re: Square Payment Module for Zen Cart [Support Thread]
I did and it did not work. I can get it to work with the default templates from zen-cart but not with my custom "Zencart_zen". btw this custom does not have a jscript folder
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
DrByte
Okay -- I think I've found a fix.
(Looks like Square changed how they do their responses ... as part of other improvements they're making.)
I believe you can resolve this problem by replacing the contents of your square_handler.php file with the code I've just updated here:
https://raw.githubusercontent.com/ze...re_handler.php
I thought I was going crazy trying to get Square to work with v156a. I kept getting HTTP 417 errors. But then I saw this post and applied the copy/replace of the square_handler.php contents. Saved the file and re-tried it. And it works! Thank you!
Re: Square Payment Module for Zen Cart [Support Thread]
I found the problem just don't know how to fix it. The problem is in my template/common/html_header.php. Once I remove this I can except payments with not problem but then my "success' page is missing "contact us" and other buttons. I think the problem is in the jscript (the html_header.php points to jscript but my template doesn't have a jscript folder). Here is my html_header.php:
<?php
/**
* Common Template
*
* outputs the html header. i,e, everything that comes before the \</head\> tag <br />
*
* @package templateSystem
* @copyright Copyright 2003-2010 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: html_header.php 15761 2010-03-31 19:31:27Z drbyte $
* @version $Id: html_header.php 0000 2007-02-25 10:37:00Z kuroi $
* Based on a post by duncanad
*/
/**
* load the module for generating page meta-tags
*/
require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
/**
* output main page HEAD tag and related headers/meta-tags, etc
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<title><?php echo META_TAG_TITLE; ?></title>
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="<?php echo STORE_NAME .', ' . TEMPLATE_DESIGN_TEXT . ', shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce';?>" />
<meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" />
<?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance') { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
<?php if (isset($canonicalLink) && $canonicalLink != '') { ?>
<link rel="canonical" href="<?php echo $canonicalLink; ?>" />
<?php } ?>
<?php
/**
* load all template-specific stylesheets, named like "style*.css", alphabetically
*/
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^style/', '.css');
while(list ($key, $value) = each($directory_array)) {
echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
}
/**
* load all template-specific stylesheets, named like "ie_*.css", alphabetically
* for stylesheets targeted at all versions of IE
*/
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ie_/', '.css');
while(list ($key, $value) = each($directory_array)) {
echo '<!--[if IE]>' . "\n";
echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />' . "\n";
echo '<![endif]-->' . "\n";
}
/**
* load all template-specific stylesheets, named like "ie7*.css", alphabetically
* for stylesheets targeted at specific versions of IE
*/
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ie[5-9]_/', '.css');
while(list ($key, $value) = each($directory_array)) {
$ver = substr ($value, 2, 1);
echo '<!--[if IE ' . $ver . ']>' . "\n";
echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />' . "\n";
echo '<![endif]-->' . "\n";
}
/**
* load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
*/
$manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
$tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
$tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base;
if ($current_page_base == 'page' && isset($ezpage_id)) $tmp_pagename = $current_page_base . (int)$ezpage_id;
$sheets_array = array('/' . $_SESSION['language'] . '_stylesheet',
'/' . $tmp_pagename,
'/' . $_SESSION['language'] . '_' . $tmp_pagename,
'/c_' . $cPath,
'/' . $_SESSION['language'] . '_c_' . $cPath,
'/m_' . $manufacturers_id,
'/' . $_SESSION['language'] . '_m_' . (int)$manufacturers_id,
'/p_' . $tmp_products_id,
'/' . $_SESSION['language'] . '_p_' . $tmp_products_id
);
while(list ($key, $value) = each($sheets_array)) {
//echo "<!--looking for: $value-->\n";
$perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . $value . '.css';
if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
}
/**
* load printer-friendly stylesheets -- named like "print*.css", alphabetically
*/
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css');
sort($directory_array);
while(list ($key, $value) = each($directory_array)) {
echo '<link rel="stylesheet" type="text/css" media="print" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
}
/**
* load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
*/
$directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js');
while(list ($key, $value) = each($directory_array)) {
echo '<script type="text/javascript" src="' . $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
}
/**
* load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
*/
$directory_array = $template->get_template_part($page_directory, '/^jscript_/', '.js');
while(list ($key, $value) = each($directory_array)) {
echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n";
}
/**
* load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
*/
$directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php');
while(list ($key, $value) = each($directory_array)) {
/**
* include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
* These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
*/
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
}
/**
* include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
*/
$directory_array = $template->get_template_part($page_directory, '/^jscript_/');
while(list ($key, $value) = each($directory_array)) {
/**
* include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
* These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
*/
require($page_directory . '/' . $value); echo "\n";
}
// DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
?>
</head>
<?php // NOTE: Blank line following is intended: ?>
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
earmsby
I've had this payment module running nicely now for a month or two. Definitely prefer it over PayPal that I was using previously. However, I'm wondering if there is a way to modify the module to send the customer/cardholder name to Square. All the payments come through as "Unknown Name" in the square dashboard. It would be very handy to have the customer's name or the cardholder name for bookkeeping purposes in Square. I'm curious as to whether the module is already supposed to do this and it's just not working in my installation of it or whether this is functionality that could be added. I'm willing to tinker if I knew where to start.
I asked this question last year and got one answer of:
Quote:
I believe that's something you need to take up with the folks at Square.
They would never process a card without the cardholder's name so, they must have it. If it doesn't show up in your Square report, it's probably because their system is not coded to do it.
But elsewhere in the thread I read:
Quote:
At the present time, in v0.9 of the module, there is no creation of customers into your Square account.
I noticed that my store is still using version 0.90 o the plugin. I'm running ZC version 1.5.5e and PHP version 7.0
Would moving to the latest version of the Square module have any effect on the customer name (and other info) being brought in to Square rather than all sales showing as "unknown" or is this just not the way the module works?
Re: Square Payment Module for Zen Cart [Support Thread]
Just received an email from square developers about depreciating renew token.. just wondering does the current module cover these new changes.
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
clebarron
Just received an email from square developers about depreciating renew token.. just wondering does the current module cover these new changes.
I received the same notice. I've been talking to their tech team about it. They assure me that right now no action is required since we're currently integrated with a prior API version. I'm investigating what cautions need to be taken for the next update. For now, according to them, you'll be fine. (fingers crossed)
EDIT/UPDATE: it turns out a change IS required. A new 0.97 version has been posted. See next post for details.