This commit is contained in:
2021-06-18 12:15:18 +03:00
commit 5534bcf2f4
9 changed files with 386 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<?php namespace Wpstudio\Sber\Classes;
use OFFLINE\Mall\Classes\Utils\DefaultMoney;
/***
* Helper class to solve this problem https://github.com/OFFLINE-GmbH/oc-mall-plugin/issues/258
* paypal error after redirect to site
* After payment via PayPal upon returning to the site, we get an error Call to a member function getCurrent() on null
*/
class DefaultMoneyRepair extends DefaultMoney
{
final protected function render($contents, array $vars): string
{
return number_format($vars['price'],$vars['currency']->decimals, ',', ' ').' '.$vars['currency']->symbol;
}
}