Summary:
No longer works after CGEcommerceBase-1.7 upgrade - missing GetName
Detailed Description:
After upgrading to CGEcommerceBase-1.8.6 (or in fact any version after
CGEcommerceBase-1.7), trying to load 'Calguys Ecommerce Base' in the E-commerce
tab results in the following error. The error is also encountered when using
"Submit" after changing settings in the Stripe Payment Gateway' module.
Fatal error: Class StripeGateway\gateway contains 1 abstract method and must
therefore be declared abstract or implement the remaining methods
(CGEcommerceBase\payment_gateway::GetName) in
/home/xxxxx/yyyyyy/cms/modules/StripeGateway/lib/class.gateway.php on line 215
The CGEcommerceBase-1.7 upgrade added
public function GetName();
to the 'payment_gateway' interface defined in interface.payment_gateway.php
(line 58), which results in the error above, since it is missing in the
'StripeGateway\lib\class.gateway.php' file.
NOTE: I also downloaded and installed AuthNetAim to see if it had GetName
defined, but it too incurred the same error. Presumably any gateway that hasn't
been updated since CGEcommerceBase-1.7 will fail too.
WORKAROUND:
I added the following to 'StripeGateway\lib\class.gateway.php' :
public function GetName()
{
$mod = \cms_utils::get_module(MOD_STRIPEGATEWAY);
return $mod->GetName() ;
}
and that seemed to fix the problem (although I'm unclear on whether that is the
name being sought...)