PHP 8.2 if that matters. USPS plugin installed.
I just upgraded to 2.0.1 so I thought I would try to reset the credit card processor and do it the right way, as I've had a variety of plugins over the years. I removed all old plugins (ceon, etc) and so just have the base authorizenet_aim plugin activated and configured.
Following directions from a comment within the plugin, it directed me to create an observer:
Code:+++ includes/classes/observers/auto.authorizenet_aim.php <?php // An auto-loaded observer that enables switching processor to eprocessingnetwork class zcObserverAuthorizenetAim extends base{ public function __construct(){ $this->attach($this, array('NOTIFY_PAYMENT_AUTHNET_MODE_SELECTION')); } public function update(&$class, $eventID, $mode, &$p2, &$p3, &$p4, &$p5, &$p6, &$p7){ error_log(print_r($class, true) . "\neventid".print_r($eventID, true). "\np2:".print_r($p2, true)."\nmode:".print_r($mode, true)); if($eventID != "NOTIFY_PAYMENT_AUTHNET_MODE_SELECTION") return; if($mode == "AIM") $mode = "eProcessing"; } }
The problem is that the $mode parameter is read-only (even if I add an &) and the $class->mode variable is private, so the comment in the authorizenet_aim module appears to be incorrect.
I can get it to work if I modify the core code directly:
But, it would be nice for the notify trigger to work correctly. I don't know if the right answer is to make the mode variable public or to pass in the parameter to the notify() as a second/third parameter so then it can be edited (and if that method is done) then the switch($this->mode) below would need to be changed as well.Code:Index: includes/modules/payment/authorizenet_aim.php =================================================================== --- includes/modules/payment/authorizenet_aim.php (revision 30655) +++ includes/modules/payment/authorizenet_aim.php (working copy) @@ -619,9 +619,9 @@ } // set URL - $this->mode = 'AIM'; + $this->mode = 'eProcessing'; $this->notify('NOTIFY_PAYMENT_AUTHNET_MODE_SELECTION', $this->mode, $submit_data);


Reply With Quote
