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

4 years ago
2 months ago
4 years ago
2 months ago
4 years ago
  1. <?php namespace Wpstudio\Sber;
  2. use Wpstudio\Sber\Classes\DefaultMoneyRepair;
  3. use OFFLINE\Mall\Classes\Payments\PaymentGateway;
  4. use OFFLINE\Mall\Classes\Utils\Money;
  5. use System\Classes\PluginBase;
  6. use Wpstudio\Sber\Classes\SberCheckout;
  7. class Plugin extends PluginBase
  8. {
  9. /**
  10. * @var array Plugin dependencies
  11. */
  12. public $require = ['Offline.Mall'];
  13. public function boot()
  14. {
  15. $gateway = $this->app->get(PaymentGateway::class);
  16. $gateway->registerProvider(new SberCheckout());
  17. // For solve this issue https://github.com/OFFLINE-GmbH/oc-mall-plugin/issues/258
  18. $this->app->singleton(Money::class, function () {
  19. return new DefaultMoneyRepair();
  20. });
  21. }
  22. public function registerComponents()
  23. {
  24. }
  25. public function registerSettings()
  26. {
  27. }
  28. }