-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlugin.php
executable file
·34 lines (28 loc) · 869 Bytes
/
Plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php namespace Iweb\YandexCheckoutMall;
use Iweb\YandexCheckoutMall\Classes\YandexCheckout;
use Iweb\YandexCheckoutMall\Classes\DefaultMoneyRepair;
use OFFLINE\Mall\Classes\Payments\PaymentGateway;
use OFFLINE\Mall\Classes\Utils\Money;
use System\Classes\PluginBase;
class Plugin extends PluginBase
{
/**
* @var array Plugin dependencies
*/
public $require = ['Offline.Mall'];
public function boot()
{
$gateway = $this->app->get(PaymentGateway::class);
$gateway->registerProvider(new YandexCheckout());
// 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()
{
}
}