diff --git a/CHANGELOG.md b/CHANGELOG.md
index 546da59..8e300ad 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+### v2.1.3 от 24.03.2022
+* Добавлен метод регистрации анонимного пользователя после покупки
+* Обновлен SDK до версии 2.2.8
+
### v2.1.2 от 14.02.2022
* Отключен способ оплаты Webmoney
* Обновлен SDK до версии 2.2.6
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index f1138c4..1cebeac 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -55,17 +55,17 @@
},
{
"name": "yoomoney/yookassa-sdk-php",
- "version": "2.2.6",
- "version_normalized": "2.2.6.0",
+ "version": "2.2.8",
+ "version_normalized": "2.2.8.0",
"source": {
"type": "git",
"url": "https://github.com/yoomoney/yookassa-sdk-php.git",
- "reference": "0bbd87d76310b3239b6e6de6534c9fab9e7db847"
+ "reference": "75f31abcf1f4b35d63579e880157719de6da5f49"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/yoomoney/yookassa-sdk-php/zipball/0bbd87d76310b3239b6e6de6534c9fab9e7db847",
- "reference": "0bbd87d76310b3239b6e6de6534c9fab9e7db847",
+ "url": "https://api.github.com/repos/yoomoney/yookassa-sdk-php/zipball/75f31abcf1f4b35d63579e880157719de6da5f49",
+ "reference": "75f31abcf1f4b35d63579e880157719de6da5f49",
"shasum": ""
},
"require": {
@@ -80,7 +80,7 @@
"mockery/mockery": "^0.9.9",
"phpunit/phpunit": "^4.8.35 || ^5.7"
},
- "time": "2022-01-21T13:31:53+00:00",
+ "time": "2022-03-11T13:07:44+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -109,7 +109,7 @@
],
"support": {
"issues": "https://github.com/yoomoney/yookassa-sdk-php/issues",
- "source": "https://github.com/yoomoney/yookassa-sdk-php/tree/2.2.6"
+ "source": "https://github.com/yoomoney/yookassa-sdk-php/tree/2.2.8"
},
"install-path": "../yoomoney/yookassa-sdk-php"
}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index cac4c1e..5f95770 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
- 'reference' => 'c03f217e1f4f17e2f000333a18d11230241edcca',
+ 'reference' => 'f69daf26e5d1aa9bf318be511dab181c6e650aff',
'name' => '__root__',
'dev' => true,
),
@@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
- 'reference' => 'c03f217e1f4f17e2f000333a18d11230241edcca',
+ 'reference' => 'f69daf26e5d1aa9bf318be511dab181c6e650aff',
'dev_requirement' => false,
),
'psr/log' => array(
@@ -29,12 +29,12 @@
'dev_requirement' => false,
),
'yoomoney/yookassa-sdk-php' => array(
- 'pretty_version' => '2.2.6',
- 'version' => '2.2.6.0',
+ 'pretty_version' => '2.2.8',
+ 'version' => '2.2.8.0',
'type' => 'library',
'install_path' => __DIR__ . '/../yoomoney/yookassa-sdk-php',
'aliases' => array(),
- 'reference' => '0bbd87d76310b3239b6e6de6534c9fab9e7db847',
+ 'reference' => '75f31abcf1f4b35d63579e880157719de6da5f49',
'dev_requirement' => false,
),
),
diff --git a/vendor/yoomoney/yookassa-sdk-php/CHANGELOG.md b/vendor/yoomoney/yookassa-sdk-php/CHANGELOG.md
index aba4c70..109cb19 100644
--- a/vendor/yoomoney/yookassa-sdk-php/CHANGELOG.md
+++ b/vendor/yoomoney/yookassa-sdk-php/CHANGELOG.md
@@ -1,3 +1,9 @@
+### v2.2.8 от 11.03.2022
+* Исправлена ошибка в сериализации объекта Receipt
+
+### v2.2.7 от 02.03.2022
+* Исправлена ошибка в сериализации объекта Receipt
+
### v2.2.6 от 21.01.2022
* Откат поддержки psr/log версий 2 и 3
diff --git a/vendor/yoomoney/yookassa-sdk-php/composer.json b/vendor/yoomoney/yookassa-sdk-php/composer.json
index c5a9078..cb4de3e 100644
--- a/vendor/yoomoney/yookassa-sdk-php/composer.json
+++ b/vendor/yoomoney/yookassa-sdk-php/composer.json
@@ -11,7 +11,7 @@
"email": "cms@yoomoney.ru"
}
],
- "version": "2.2.6",
+ "version": "2.2.8",
"require": {
"php": ">=5.3.0",
"ext-curl": "*",
@@ -24,6 +24,25 @@
"phpunit/phpunit": "^4.8.35 || ^5.7",
"mockery/mockery": "^0.9.9"
},
+ "scripts": {
+ "test": [
+ "@phpunit",
+ "@phpcbf",
+ "@phpcs",
+ "@phpmd"
+ ],
+ "ci": [
+ "@phplint",
+ "@phpunit",
+ "@phpcs",
+ "@phpmd"
+ ],
+ "phplint": "vendor/bin/parallel-lint --exclude vendor/ --exclude .idea/ -e php,module,inc,install,profile,theme .",
+ "phpunit": "vendor/bin/phpunit --configuration=phpunit.xml.dist",
+ "phpcs": "vendor/bin/phpcs --ignore=vendor/,.idea/ --standard=phpcs.xml --extensions=php,module,inc,install,profile,theme,css,info,txt,md,yml --report=full .",
+ "phpcbf": "vendor/bin/phpcbf --ignore=vendor/,.idea/ --standard=phpcs.xml --extensions=php,module,inc,install,profile,theme,css,info,txt,md,yml .",
+ "phpmd": "vendor/bin/phpmd --exclude vendor/,.idea/ --suffixes php,module,inc,install,profile,theme . text phpmd.xml"
+ },
"autoload": {
"psr-4": {
"YooKassa\\": "lib/"
diff --git a/vendor/yoomoney/yookassa-sdk-php/lib/Client.php b/vendor/yoomoney/yookassa-sdk-php/lib/Client.php
index 598ac1b..b55209c 100644
--- a/vendor/yoomoney/yookassa-sdk-php/lib/Client.php
+++ b/vendor/yoomoney/yookassa-sdk-php/lib/Client.php
@@ -112,7 +112,7 @@ class Client extends BaseClient
/**
* Текущая версия библиотеки
*/
- const SDK_VERSION = '2.2.6';
+ const SDK_VERSION = '2.2.8';
/**
* Получить список платежей магазина
diff --git a/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/AbstractReceiptResponse.php b/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/AbstractReceiptResponse.php
index ffbbec3..fc6befe 100644
--- a/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/AbstractReceiptResponse.php
+++ b/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/AbstractReceiptResponse.php
@@ -613,4 +613,4 @@ public function notEmpty()
* @return void
*/
abstract public function setSpecificProperties($receiptData);
-}
\ No newline at end of file
+}
diff --git a/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequest.php b/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequest.php
index c219146..db347fa 100644
--- a/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequest.php
+++ b/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequest.php
@@ -70,6 +70,9 @@ class CreatePostReceiptRequest extends AbstractRequest implements CreatePostRece
/** @var string Идентификатор объекта оплаты */
private $_object_id;
+ /** @var string Тип объекта: приход "payment" или возврат "refund". */
+ private $_object_type;
+
/** @var string Идентификатор магазина в ЮKassa */
private $_onBehalfOf;
@@ -102,6 +105,26 @@ public function setObjectId($value)
$this->_object_id = $value;
}
+ /**
+ * Возвращает тип объекта чека
+ *
+ * @return string Тип объекта чека
+ */
+ public function getObjectType()
+ {
+ return $this->_object_type;
+ }
+
+ /**
+ * Устанавливает тип объекта чека
+ *
+ * @param string $value Тип объекта чека
+ */
+ public function setObjectType($value)
+ {
+ $this->_object_type = $value;
+ }
+
/**
* Проверяет наличие данных о плательщике
*
@@ -262,6 +285,9 @@ public function setType($value)
throw new InvalidPropertyValueException('Invalid receipt type value', 0, 'Receipt.type', $value);
}
$this->_type = (string)$value;
+ if (!$this->_object_type) {
+ $this->_object_type = $this->_type;
+ }
} else {
throw new InvalidPropertyValueTypeException(
'Invalid receipt type value type', 0, 'Receipt.type', $value
@@ -432,6 +458,16 @@ public function validate()
return false;
}
+ if (empty($this->_object_type)) {
+ $this->setValidationError('Receipt object_type not specified');
+ return false;
+ }
+
+ if (empty($this->_object_id)) {
+ $this->setValidationError('Receipt object_id not specified');
+ return false;
+ }
+
if (empty($this->_send)) { // todo: пока может быть только true
$this->setValidationError('Receipt send not specified');
return false;
@@ -450,4 +486,4 @@ public function validate()
return true;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequestBuilder.php b/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequestBuilder.php
index 440578d..fb2d495 100644
--- a/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequestBuilder.php
+++ b/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequestBuilder.php
@@ -35,6 +35,7 @@
use YooKassa\Model\ReceiptCustomer;
use YooKassa\Model\ReceiptCustomerInterface;
use YooKassa\Model\ReceiptItemInterface;
+use YooKassa\Model\ReceiptType;
use YooKassa\Model\SettlementInterface;
/**
@@ -223,11 +224,27 @@ public function setSettlements($value)
* Устанавливает Id объекта чека
*
* @param string $value Id объекта чека
+ * @param string|null $type Тип объекта чека
* @return CreatePostReceiptRequestBuilder
*/
- public function setObjectId($value)
+ public function setObjectId($value, $type=null)
{
$this->currentObject->setObjectId($value);
+ if (!empty($type)) {
+ $this->currentObject->setObjectType($type);
+ }
+ return $this;
+ }
+
+ /**
+ * Устанавливает тип объекта чека
+ *
+ * @param string $value Тип объекта чека
+ * @return CreatePostReceiptRequestBuilder
+ */
+ public function setObjectType($value)
+ {
+ $this->currentObject->setObjectType($value);
return $this;
}
@@ -246,12 +263,14 @@ public function build(array $options = null)
if (!empty($options['payment_id'])) {
$this->setObjectId($options['payment_id']);
+ $this->setObjectType(ReceiptType::PAYMENT);
} elseif (!empty($options['refund_id'])) {
$this->setObjectId($options['refund_id']);
+ $this->setObjectType(ReceiptType::REFUND);
}
}
return parent::build($options);
}
-}
\ No newline at end of file
+}
diff --git a/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequestSerializer.php b/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequestSerializer.php
index e0dd7ab..81c68dc 100644
--- a/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequestSerializer.php
+++ b/vendor/yoomoney/yookassa-sdk-php/lib/Request/Receipts/CreatePostReceiptRequestSerializer.php
@@ -86,12 +86,12 @@ private function serializeObjectId(CreatePostReceiptRequestInterface $request)
{
$result = array();
- if ($request->getType() === ReceiptType::PAYMENT) {
+ if ($request->getObjectType() === ReceiptType::PAYMENT) {
$result['payment_id'] = $request->getObjectId();
- } elseif ($request->getType() === ReceiptType::REFUND) {
+ } elseif ($request->getObjectType() === ReceiptType::REFUND) {
$result['refund_id'] = $request->getObjectId();
}
return $result;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/yoomoney/yookassa-sdk-php/phpdoc.xml b/vendor/yoomoney/yookassa-sdk-php/phpdoc.xml
index d109a12..b4e8a6c 100644
--- a/vendor/yoomoney/yookassa-sdk-php/phpdoc.xml
+++ b/vendor/yoomoney/yookassa-sdk-php/phpdoc.xml
@@ -9,7 +9,7 @@
-
+
latest