Re: Authorize.net API with Card on File transactions support thread...
In includes/modules/payment/authorizenet_cim.php, the function getCustomerCards() returns the query result. Did you intend the process the query result and return an array as was done in includes/modules/payment/authorizenet_cof.php ? Because the way it is now makes no sense - see the references to the results of getCustomerCards in admin/includes/classes/observers/class.cim_admin_observer.php line 65 and 72 for example
$key = array_search($cc_index, array_column($cards, 'id'));
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
swguy
In includes/modules/payment/authorizenet_cim.php, the function getCustomerCards() returns the query result. Did you intend the process the query result and return an array as was done in includes/modules/payment/authorizenet_cof.php ? Because the way it is now makes no sense - see the references to the results of getCustomerCards in admin/includes/classes/observers/class.cim_admin_observer.php line 65 and 72 for example
$key = array_search($cc_index, array_column($cards, 'id'));
perhaps this level of code discussion is better suited over at the publicly available github repository. i continuously update and release when necessary and perhaps it will be easier to point out your code issues in the latest version of the master branch.
it does seem that a refactor is necessary as the one function does return a query result while the other function does return an array. i will have to take a closer look to see why this was done the way it was, and whether or not there is a bug there. it is entirely possible.
Re: Authorize.net API with Card on File transactions support thread...
1 Attachment(s)
Re: Authorize.net API with Card on File transactions support thread...
I'm having just a couple of issues getting the plug-in to work w/ ZC 1.5.7c; PHP 7.4.25; MySQL 5.5.5-10.3.32-MariaDB
1. When confirming final checkout, I get an error:
"Transaction Failed
Error code : 11
Error message : A duplicate transaction has been submitted."
Even though its not a duplicate - first time, new dollar amount, etc.
2. Also, an error log is being created with every attempt indicating a fatal PHP error due to an incorrect datetime value. I've attached the logfile on that one.
I've rechecked to ensure that everything was uploaded and the data table looks right.
This may be a conflict w/ our template or some other mod, but wanted to throw it out here first to see if anyone has any ideas.
Thank you!
Matt
1 Attachment(s)
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
apollowilcox
I'm having just a couple of issues getting the plug-in to work w/ ZC 1.5.7c; PHP 7.4.25; MySQL 5.5.5-10.3.32-MariaDB
1. When confirming final checkout, I get an error:
"Transaction Failed
Error code : 11
Error message : A duplicate transaction has been submitted."
Even though its not a duplicate - first time, new dollar amount, etc.
2. Also, an error log is being created with every attempt indicating a fatal PHP error due to an incorrect datetime value. I've attached the logfile on that one.
I've rechecked to ensure that everything was uploaded and the data table looks right.
This may be a conflict w/ our template or some other mod, but wanted to throw it out here first to see if anyone has any ideas.
Thank you!
Matt
hey matt,
lets address the error log and see if the duplicate transaction gets fixed; which i think it will.
it seems that you have stumbled upon a problem that i have already addressed, but unfortunately is not up on the zen-cart plugin page. bad carl, bad!
it is related to strict mode on newer versions of mysql.
try and replace:
includes/modules/payment/authorizenet_cim.php
with this file here:
https://raw.githubusercontent.com/pr...izenet_cim.php
you can just copy and paste the file from there. alternatively i have attached it here:
Attachment 19836
let me know if that works. if so, i will re-upload so that it is up on the plugins for all to enjoy.
best.
p.
1 Attachment(s)
Re: Authorize.net CIM - incorrect datetime Value
Lol! Thanks Carl.
I uploaded the new code and upon confirming the test order, got the error screen and when I refreshed, I was completely logged out.
The same log file/ error of 'incorrect datetime value.'
Confirmed that the new file did upload and did it again just to make sure. Retried... same.
Attachment 19837
Re: Authorize.net CIM - incorrect datetime Value
Quote:
Originally Posted by
apollowilcox
Lol! Thanks Carl.
I uploaded the new code and upon confirming the test order, got the error screen and when I refreshed, I was completely logged out.
The same log file/ error of 'incorrect datetime value.'
Confirmed that the new file did upload and did it again just to make sure. Retried... same.
Attachment 19837
ok, great thanks for that.
lets try changing a couple of lines in the same file. pretty convinced this will now work. lines 1521 and 1522:
PHP Code:
//from
$mod_date = null;
$bindType = 'date';
//to
$mod_date = 'null';
$bindType = 'noquotestring';
if i ever do a refactor, i will remove these date fields and store them as integer using a UTC timestamp. so much easier to maintain.
let me know if this works.
Re: Authorize.net CIM - incorrect datetime Value
Thank you Carl. That indeed fixed the date issue. It led to one other error which caused the same symptoms and was simple enough even I was able to diagnose it.
Line 1640 of that same file needs a comma between :adminName, now()
Code:
$sql = "insert into " . TABLE_ORDERS_STATUS_HISTORY . " (comments, orders_id, orders_status_id, updated_by, date_added) values (:orderComments, :orderID, :orderStatus, :adminName, now() )";
(Commas can kill... Let's eat Grandma!)
Now she works!! We'll watch it for a few days.
Thanks so much for the support.
Re: Authorize.net CIM - incorrect datetime Value
thanks for pointing that out. although i believe the line is 1620:
https://github.com/proseLA/authorize..._cim.php#L1620
good catch. i'll have a new version up soon.
best.
Re: Authorize.net CIM - Fantastic partial pay feature
So, we've been testing this mod a bit. We didn't even realize that the plug-in included one feature that it going to be super helpful.
With this plug-in, we can capture a partial amount and it will create a new authorization for the balance. The balance is displayed on the order-admin and can be easily captured later after the backorder ships. Super cool. Thanks Carl! We would have asked for this long ago but never even thought it possible.:D