The customer's name is transmitted with the payment, but Square doesn't display it in their dashboard.
I think getting it to display requires injecting your customer into your Square account whenever a sale is made, then linking an order to that customer, and then linking the payment to that customer+order. That's gonna require a notable reworking of the Square module. It's on the radar but no date has been set for working on that yet.
I'm prepping for an update that improves other underlying components to be compatible with Square's latest updates. This update will also increase some of the data transmitted, but I don't expect it will fix the "Unknown" label you mentioned.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Great work on the Square module! Thank you!
When Square is updating their API (which they did quite often in 2019), can I usually update without worrying or is there a good chance that the Zen Cart module will not work anymore?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Would it be possible to display a field in the form instead? that way we store owners could also verify that information when processing the order. We had some quite serious problems in the past 2 years where a few of our customers were using their spouses/ex-spouses/boyfriends credit cards without their authorization (or so the credit card owners claimed) to place orders on our website, which we had to refund as they ended up being unauthorized. We lost the products and the funds, so not cool. Having a field in the form to verify the name on the card would at least provide a certain level of security for merchants (somewhat).
I looked into the square developer and I found (not that I even pretend to know anything about it) a the cardholder_name parameter https://developer.squareup.com/refer...-customer-card
Could this be incorporated?
Thank you for all you do, and for looking into this.
ZC 1.5.5f
PHP 7.1.33
MySQL 5.7.23-23
Square 0.97
I've got a cron job that runs on odd numbered days to refresh OAuth. It's been running quietly for months. A bit over a week ago, it's been triggering the following error:
I've verified that the cron is running PHP 7.1.33.Code:[19-Dec-2019 00:00:02 America/Los_Angeles] PHP Fatal error: Uncaught Error: Class 'square' not found in /*****/********/public_html/mystoredomain/square_handler.php:21 Stack trace: #0 {main} thrown in /*****/********/public_html/mystoredomain/square_handler.php on line 21
My host changed how they serve up PHP on December 17 that bumped the PHP version my cart used to 7.3, which triggered numerous errors/warnings. I went into the control panel and backed PHP down to 7.1.33. I've been getting the cron triggered errors since then.
I haven't done any significant changes to the cart in this time frame. Square payments are being processed normally.
I would appreciate any thoughts and suggestions on how to fix this.
I've tracked down the reason that the cron job triggers the error reported in my last post.
It appears that with the latest host changes that $PHP_SELF and (most?) $_SERVER variables are empty when the script is run from cron. The code in includes/classes/payment.php failed to find the square payment module because it extracts the script type (.php) from the $PHP_SELF variable.
My patch to get around this problem was to set $PHP_SELF to __FILE__ if $PHP_SELF was empty in square_handler.php near line 13:
All seems well now.Code:require 'includes/application_top.php'; if (empty($PHP_SELF)) $PHP_SELF = __FILE__; // ensure that $PHP_SELF is not empty require DIR_WS_CLASSES . 'payment.php';
As far as having that data show on Square's end, I believe it's tied to the same thing I mentioned earlier. I think it'll require creating the complete customer record in order to get any of that data to show in their dashboard.
I suppose you could add the custom field to the payment page and make sure the Order class stores it when saving the order, so that in your own Zen Cart admin screens you could access the cardholder name. Again, you wouldn't see it on Square's end though. You'd need to add cc_owner in the various parts of this section of the module: https://github.com/zencart/zencart/b....php#L166-L257 akin to what's done here in this one: https://github.com/zencart/zencart/b....php#L222-L318
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.