Even when the module is disabled. In our case this happened for Nederlands and Serbia
I looks like the module does not check if a certain feature is active when retreiving the config
\Dotpay\Payment\Model\Ui\AbstractConfigProvider::getConfig
and here
\Dotpay\Payment\Model\Ui\AbstractConfigProvider::getAgreements
It always builds and send a request
None of exceptions from \Dotpay\Resource\Channel\Request should happen and no requests to Dotpay server should be sent if the module is disabled under a store or globally.
On timeline view we can see that module performs curl request even when disabled, that cost our CPU additional 450ms.
Please fix both issues.
WORKAROUND:
Patch methods, and add a fallback to accepted values instead of throwing an exception
if (!Language::validate($language)) {
//throw new LanguageException($language);
//fallback to english
$language = (string) 'en';
}
This class throws exception like
or
Even when the module is disabled. In our case this happened for Nederlands and Serbia I looks like the module does not check if a certain feature is active when retreiving the config
None of exceptions from
\Dotpay\Resource\Channel\Request
should happen and no requests to Dotpay server should be sent if the module is disabled under a store or globally.On timeline view we can see that module performs curl request even when disabled, that cost our CPU additional 450ms.
Please fix both issues.
WORKAROUND: Patch methods, and add a fallback to accepted values instead of throwing an exception