Zen Cart Logo
Forums / Bug Reports / Undefined constant MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY

Undefined constant MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY

Views: 4,652

Results 1 to 2 of 2
27 Feb 2019, 17:13
#1
panzc2020 avatar

panzc2020

New Zenner

Join Date:
May 2014
Posts:
68
Plugin Contributions:
0

Undefined constant MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY

PHP 7.3.2 / Zen Cart Version 1.5.6a (with files from GitHub)

Potential payment module error in future PHP version.

[26-Feb-2019 16:51:18 UTC] Request URI: /zc156/adm/orders.php?page=1&oID=12503&action=edit, IP address: ::1
#1  authorizenet_aim->__construct() called at [C:\wamp64\www\zc156\adm\orders.php:423]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY - assumed 'MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY'
(this will throw an Error in a future version of PHP) in C:\wamp64\www\zc156\includes\modules\payment\authorizenet_aim.php on line 134.

[admin]/orders.php line 423

      if ($action == 'edit' && $order_exists) {
        $order = new order($oID);
        $zco_notifier->notify('NOTIFY_ADMIN_ORDERS_EDIT_BEGIN', $oID, $order);
        if ($order->info['payment_module_code']) {
          if (file_exists(DIR_FS_CATALOG_MODULES . 'payment/' . $order->info['payment_module_code'] . '.php')) {
            require(DIR_FS_CATALOG_MODULES . 'payment/' . $order->info['payment_module_code'] . '.php');
            require(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_module_code'] . '.php');
            $module = new $order->info['payment_module_code'];
//        echo $module->admin_notification($oID);
          }

includes/modules/payment/authorizenet_aim.php line 134

    // set the currency for the gateway (others will be converted to this one before submission)
    $this->gateway_currency = MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY;

It's not effect anything now, but it may possibly lead to bigger problem in near future.

27 Feb 2019, 20:01
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Undefined constant MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY

This means you need to uninstall and reinstall the AIM payment module.