You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
835 B
34 lines
835 B
<?php namespace Wpstudio\Sber;
|
|
|
|
use Wpstudio\Sber\Classes\DefaultMoneyRepair;
|
|
use OFFLINE\Mall\Classes\Payments\PaymentGateway;
|
|
use OFFLINE\Mall\Classes\Utils\Money;
|
|
use System\Classes\PluginBase;
|
|
use Wpstudio\Sber\Classes\SberCheckout;
|
|
|
|
class Plugin extends PluginBase
|
|
{
|
|
/**
|
|
* @var array Plugin dependencies
|
|
*/
|
|
public $require = ['Offline.Mall'];
|
|
|
|
public function boot()
|
|
{
|
|
$gateway = $this->app->get(PaymentGateway::class);
|
|
$gateway->registerProvider(new SberCheckout());
|
|
|
|
// For solve this issue https://github.com/OFFLINE-GmbH/oc-mall-plugin/issues/258
|
|
$this->app->singleton(Money::class, function () {
|
|
return new DefaultMoneyRepair();
|
|
});
|
|
}
|
|
public function registerComponents()
|
|
{
|
|
}
|
|
|
|
public function registerSettings()
|
|
{
|
|
}
|
|
|
|
}
|