The context here might be admin?
Next issue - really crazy-making, not sure how this can happen. COF transactions failing. Possibly related: The enabled field gets flipped to N when this happens.
[26-Jun-2024 09:36:49 America/New_York] PHP Fatal error: Uncaught Error: Typed property authorizenet_cim::$transID must not be accessed before initialization in /home/thatsoftwareguy4/client/includes/modules/payment/authorizenet_cim.php:382
Stack trace:
#0 /home/thatsoftwareguy4/client/includes/classes/payment.php(297): authorizenet_cim->after_process()
#1 /home/thatsoftwareguy4/client/includes/modules/pages/checkout_process/header_php.php(16): payment->after_process()
#2 /home/thatsoftwareguy4/client/index.php(82): require('/home/thatsoftw...')
#3 {main}
thrown in /home/thatsoftwareguy4/client/includes/modules/payment/authorizenet_cim.php on line 382
[26-Jun-2024 09:36:49 America/New_York] Request URI: /index.php?main_page=checkout_process, IP address: 68.73.117.78
--> PHP Fatal error: Uncaught Error: Typed property authorizenet_cim::$transID must not be accessed before initialization in /home/thatsoftwareguy4/client/includes/modules/payment/authorizenet_cim.php:382
Stack trace:
#0 /home/thatsoftwareguy4/client/includes/classes/payment.php(297): authorizenet_cim->after_process()
#1 /home/thatsoftwareguy4/client/includes/modules/pages/checkout_process/header_php.php(16): payment->after_process()
#2 /home/thatsoftwareguy4/client/index.php(82): require('/home/thatsoftw...')
#3 {main}
thrown in /home/thatsoftwareguy4/client/includes/modules/payment/authorizenet_cim.php on line 382.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
i am not sure how this module is getting disabled in your setup.
line 382 does NOT correspond to the after_process method in my code.
in this situation, you have clearly modified my code.
i can debug problems that i can replicate from a vanilla install.
the information provided here seems to suggest putting me on some sort of wild goose chase:
- not sure how this can happen.
- maybe the admin?
- maybe disabled?
- incorrect line numbers from my own code?
my time for free support is limited; and the error that you are now presenting here is out of that limitation.
In case you see this again, my context is PHP 8.1/ZC 1.5.8.
It's not the module that gets disabled, it's the card in the customers_cc table. Sorry, should have clarified.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
In case anyone else is getting mismatches between authorize's invoice number and Zen Cart's order number for orders which are NOT placed at the same time, it may be worth changing includes/modules/payment/authorizenet_cim.php nextOrderNumber() function to do
$result = $db->Execute("SELECT max(orders_id)+1 AS orders_id FROM " . TABLE_ORDERS . " ORDER BY orders_id");
$next_order_id = $result->fields['orders_id'];
return $next_order_id;
instead of pulling the auto_increment value from SHOW TABLE STATUS.
The use of max(orders_id) mirrors the "next id prediction" logic used by other parts of Zen Cart, such as the attributes controller and specials/featured product management.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
At the end of before_process() in authorizenet_cim.php you call chargeCustomerProfile(). Should this be wrapped in a check like
if ($this->authorizationType != 'Authorize')
I'm asking because I have configured CIM to Auth Only but it seems to be charging.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
scott,
I am really trying to understand your question. I suppose I could understand it if it was coming from a store owner with limited coding experience. but as you are one of the big machers in ZC, I do not understand it.
in a word:
NO.
I would suggest looking at the code. and then looking at it again.
$this→authorizationType gets initialized to `Authorize`. and then it does not get changed and or used until the method (chargeCustomerProfile) that you are asking to not be called.
I could go on. and on. but I will not.
if you would like me to figure out what is happening on your clients site with regards to this module, I am certainly available for hire.
this payment module is mature. the ability to authorize only or authorize and capture together has been well established since I initially made this payment module available for community use.
best.