You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Merchant_Billing_Gateway class there are some properties that must be available without making an instance of class.
These properties are: $default_currency;
$supported_countries;
$homepage_url;
$display_name;
$supported_cardtypes;
$money_format;
This is useful when we want to display information for each gateway, without make an instance. Also an instance requires some options in constructor that may not be available to someone who wants just to see what each gateway supports.
First thought is to make these properties static and access their values via Reflection class.
But ... $money_format and $supported_cardtypes are used in amount() and supported_cardtypes(), methods. So if we make them static and use self::$money_format or self::$supported_countries this will end up with the default value of Merchant_Billing_Gateway and not the value we have in each Gateway.
Is there any way to resolve this?
The text was updated successfully, but these errors were encountered:
In Merchant_Billing_Gateway class there are some properties that must be available without making an instance of class.
These properties are:
$default_currency;
$supported_countries;
$homepage_url;
$display_name;
$supported_cardtypes;
$money_format;
This is useful when we want to display information for each gateway, without make an instance. Also an instance requires some options in constructor that may not be available to someone who wants just to see what each gateway supports.
First thought is to make these properties static and access their values via Reflection class.
But ...
$money_format
and$supported_cardtypes
are used inamount()
andsupported_cardtypes(),
methods. So if we make them static and useself::$money_format
orself::$supported_countries
this will end up with the default value of Merchant_Billing_Gateway and not the value we have in each Gateway.Is there any way to resolve this?
The text was updated successfully, but these errors were encountered: