megaxeso Designer De Mexico Membro desde jul 2019 megaxeso 22 dez 2023 00:24 hello, I am getting an error. I have already entered all the data in the module. it tells me the following: [b]Fatal error: Class "Openpay" not found in ~/includes/modules/payment/pm_openpay.inc.php (Line 42)[/b] on line 42 is the following: [b]$openpay = Openpay::getInstance($this->settings['merchant_id'], $this->settings['private_key'], $this->settings['country_code']);[/b] I hope you can help me.
mllc Developer De United States Membro desde jul 2020 mllc 22 dez 2023 02:21 Hi, It's been long since I touched the code last time. i don't even have an api key for testing. And I'm not sure whether openpay changed the library code. Right now, I don't even have a working instance of the module, though I did. Anyway, I assume you read the module's readme file: ... Download the latest version of Openpay PHP library (https://github.com/open-pay/openpay-php) to the subfolder includes, located within the corresponding path of your LiteCart installation. So, that Openpay PHP library's files will be in this subfolder /includes/openpay/. Modify the Litecart autoloader file located at /includes/autoloader.inc.php. Add the following cases to the beginnning of the switch clause: /openpay cases/ case (substr($class, 0, 10) == 'OpenpayApi'): require_once vmod::check(FS_DIR_APP . 'includes/openpay-php/data/' . $class . '.php'); break; case ($class == 'Openpay'): require_once vmod::check(FS_DIR_APP . 'includes/openpay-php/' . $class . '.php'); break; case ($class != 'Openpay' && substr($class, 0, 10) == 'OpenpayApi'): require_once vmod::check(FS_DIR_APP . 'includes/openpay-php/resources/' . $class . '.php'); break; case ($class == 'OpenpayId' || $class == 'OpenpayAuthorization' || $class == 'OpenpayOperation_type' || $class == 'OpenpayTransaction_type' || $class == 'OpenpayStatus' || $class == 'OpenpayConciliated' || $class == 'OpenpayCreation_date' || $class == 'OpenpayOperation_date' || $class == 'OpenpayDescription' || $class == 'OpenpayError_message' || $class == 'OpenpayOrder_id' || $class == 'OpenpayCurrency' || $class == 'OpenpayPayment' || $class == 'OpenpayAmount' || $class == 'OpenpayPayment_method' || $class == 'OpenpayName' || $class == 'OpenpayLast_name' || $class == 'OpenpayEmail' || $class == 'OpenpayPhone_number' || $class == 'OpenpayAddress' || $class == 'OpenpayExternal' || $class == 'OpenpayExternal_id' || $class == 'OpenpayClabe' || $class == 'OpenpayMethod' || $class == 'OpenpayExchange_rate' || $class == 'OpenpayType' || $class == 'OpenpayBrand' || $class == 'OpenpayCard_number' || $class == 'OpenpayHolder_name' || $class == 'OpenpayExpiration_year' || $class == 'OpenpayExpiration_month' || $class == 'OpenpayAllows_charges' || $class == 'OpenpayAllows_payouts' || $class == 'OpenpayBank_name' || $class == 'OpenpayBank_code' || $class == 'OpenpayTax' || $class == 'OpenpayPoints_type' || $class == 'OpenpayPoints_card' ): break; /*****/ Go to Admin Panel -> Modules -> Payment to install and configure your new module. Hope this help, Josue