Skip to content

Commit

Permalink
Merge pull request #12 from yoomoney/release/v2.1.0
Browse files Browse the repository at this point in the history
Release/2.1.0
  • Loading branch information
tonchik-tm authored Oct 13, 2021
2 parents ac06900 + f405b10 commit 240ae23
Show file tree
Hide file tree
Showing 218 changed files with 3,932 additions and 1,479 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v2.1.0 от 13.10.2021
* Замена Сбербанк Онлайн на SberPay
* Обновлен SDK до версии 2.1.7

### v2.0.1 от 19.08.2021
* Исправление ссылки на демо-магазин в readme

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ define('MODULE_PAYMENT_YOOMONEY_MODE', MODULE_PAYMENT_YOOMONEY_MODE1);
* QIWI Wallet;
* Наличные;
* Альфа-Клик;
* Сбербанк Онлайн;
* SberPay;
* Баланс мобильного — Билайн, Мегафон, МТС, Tele2.

### Дополнительные возможности
Expand Down
Binary file modified oscommerce-yoomoney-module.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions src/includes/languages/english/modules/payment/yoomoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
define('MODULE_PAYMENT_YOOMONEY_SHOP_PASSWORD_DESCRIPTION', 'Issue and activate a secret key under your YooKassa\'s Merchant Profile. Then copy it here.');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_MODE_LABEL', 'Select payment method');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_BANK_CARD_LABEL', 'Bank cards');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_SBERBANK_LABEL', 'Sberbank Online');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_SBERBANK_LABEL', 'SberPay');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_WEBMONEY_LABEL', 'Webmoney');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_ALFABANK_LABEL', 'Alfa-Click');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_TINKOFF_BANK_LABEL', 'Tinkoff online banking');
Expand All @@ -40,7 +40,7 @@
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_INSTALLMENTS_LABEL', 'Installments');

define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_BANK_CARD_TEXT', 'Bank cards');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_SBERBANK_TEXT', 'Sberbank Online');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_SBERBANK_TEXT', 'SberPay');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_WEBMONEY_TEXT', 'Webmoney');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_ALFABANK_TEXT', 'Alfa-Click');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_TINKOFF_BANK_TEXT', 'Tinkoff online banking');
Expand Down Expand Up @@ -74,7 +74,7 @@
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_MC", "Mobile phone balance");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_WM", "WebMoney e-wallet");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_AB", "Alfa-Click");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_SB", "Sberbank: payment by text messages or Sberbank Online");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_SB", "Sberbank: payment by text messages or SberPay");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_MA", "MasterPass");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_QW", "QIWI Wallet");

Expand Down Expand Up @@ -102,7 +102,7 @@
define('MODULE_PAYMENT_YOOMONEY_ACCEPT_CARDS_LNG', 'Оплата с произвольной банковской карты? ');
define('MODULE_PAYMENT_YOOMONEY_WEBMONEY_LNG', 'Оплата из кошелька в системе WebMoney?');
define('MODULE_PAYMENT_YOOMONEY_AB_LNG', 'Оплата через Альфа-Клик?');
define('MODULE_PAYMENT_YOOMONEY_SB_LNG', 'Оплата через Сбербанк: оплата по SMS или Сбербанк Онлайн?');
define('MODULE_PAYMENT_YOOMONEY_SB_LNG', 'Оплата через Сбербанк: оплата по SMS или SberPay?');
define('MODULE_PAYMENT_YOOMONEY_MA_LNG', 'Оплата через MasterPass?');
define('MODULE_PAYMENT_YOOMONEY_PB_LNG', 'Оплата через интернет-банк Промсвязьбанка?');
define('MODULE_PAYMENT_YOOMONEY_QW_LNG', 'Оплата через QIWI Wallet?');
Expand Down
8 changes: 4 additions & 4 deletions src/includes/languages/russian/modules/payment/yoomoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
define('MODULE_PAYMENT_YOOMONEY_SHOP_PASSWORD_DESCRIPTION', 'Выпустите и активируйте секретный ключ в личном кабинете ЮKassa. Потом скопируйте его сюда.');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_MODE_LABEL', 'Выбор способа оплаты на стороне магазина');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_BANK_CARD_LABEL', 'Банковские карты');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_SBERBANK_LABEL', 'Сбербанк Онлайн');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_SBERBANK_LABEL', 'SberPay');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_WEBMONEY_LABEL', 'Webmoney');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_ALFABANK_LABEL', 'Альфа-Клик');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_TINKOFF_BANK_LABEL', 'Интернет-банк Тинькофф');
Expand All @@ -40,7 +40,7 @@
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_INSTALLMENTS_LABEL', 'Заплатить по частям');

define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_BANK_CARD_TEXT', 'Банковские карты');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_SBERBANK_TEXT', 'Сбербанк Онлайн');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_SBERBANK_TEXT', 'SberPay');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_WEBMONEY_TEXT', 'Webmoney');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_ALFABANK_TEXT', 'Альфа-Клик');
define('MODULE_PAYMENT_YOOMONEY_PAYMENT_METHOD_TINKOFF_BANK_TEXT', 'Интернет-банк Тинькофф');
Expand Down Expand Up @@ -74,7 +74,7 @@
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_MC", "Счет мобильного телефона");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_WM", "Кошелек WebMoney");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_AB", "Альфа-Клик");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_SB", "Сбербанк: оплата по SMS или Сбербанк Онлайн");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_SB", "Сбербанк: оплата по SMS или SberPay");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_MA", "MasterPass");
define("MODULE_PAYMENT_YOOMONEY_TEXT_PAYMENT_TYPE_QW", "QIWI Wallet");

Expand Down Expand Up @@ -102,7 +102,7 @@
define('MODULE_PAYMENT_YOOMONEY_ACCEPT_CARDS_LNG', 'Оплата с произвольной банковской карты? ');
define('MODULE_PAYMENT_YOOMONEY_WEBMONEY_LNG', 'Оплата из кошелька в системе WebMoney?');
define('MODULE_PAYMENT_YOOMONEY_AB_LNG', 'Оплата через Альфа-Клик?');
define('MODULE_PAYMENT_YOOMONEY_SB_LNG', 'Оплата через Сбербанк: оплата по SMS или Сбербанк Онлайн?');
define('MODULE_PAYMENT_YOOMONEY_SB_LNG', 'Оплата через Сбербанк: оплата по SMS или SberPay?');
define('MODULE_PAYMENT_YOOMONEY_MA_LNG', 'Оплата через MasterPass?');
define('MODULE_PAYMENT_YOOMONEY_PB_LNG', 'Оплата через интернет-банк Промсвязьбанка?');
define('MODULE_PAYMENT_YOOMONEY_QW_LNG', 'Оплата через QIWI Wallet?');
Expand Down
2 changes: 1 addition & 1 deletion src/includes/modules/payment/yoomoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class YooMoney
const MODE_KASSA = 1;
const MODE_MONEY = 2;

const MODULE_VERSION = '2.0.1';
const MODULE_VERSION = '2.1.0';
const INSTALLMENTS_MIN_AMOUNT = 3000;

public $code;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
*
* @author Fabien Potencier <[email protected]>
* @author Jordi Boggiano <[email protected]>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
private $vendorDir;

// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
Expand All @@ -57,10 +59,17 @@ class ClassLoader
private $missingClasses = array();
private $apcuPrefix;

private static $registeredLoaders = array();

public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}

public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}

return array();
Expand Down Expand Up @@ -300,6 +309,17 @@ public function getApcuPrefix()
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);

if (null === $this->vendorDir) {
return;
}

if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}

/**
Expand All @@ -308,6 +328,10 @@ public function register($prepend = false)
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));

if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}

/**
Expand Down Expand Up @@ -367,6 +391,16 @@ public function findFile($class)
return $file;
}

/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}

private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
Expand Down
Loading

0 comments on commit 240ae23

Please sign in to comment.