Исправлен autoload.php

This commit is contained in:
Антон Н. Николаев
2020-12-08 10:56:01 +03:00
parent 3b0587987c
commit 44a866bcee
9 changed files with 29 additions and 18 deletions
+3
View File
@@ -1,3 +1,6 @@
### v2.0.2 от 08.12.2020
* Исправлен autoload.php
### v2.0.1 от 02.12.2020
* Небольшие исправления
+5 -1
View File
@@ -1,13 +1,17 @@
{
"name": "yoomoney/yookassa-sdk-php",
"description": "This is a developer tool for integration with YooMoney.",
"type": "library",
"license": "MIT",
"homepage": "https://yookassa.ru/developers/api",
"keywords": ["yoomoney", "yookassa", "payments", "api", "sdk"],
"authors": [
{
"name": "YooMoney",
"email": "cms@yoomoney.ru"
}
],
"version": "2.0.1",
"version": "2.0.2",
"require": {
"php": ">=5.3.0",
"ext-curl": "*",
+1 -1
View File
@@ -90,7 +90,7 @@ class Client extends BaseClient
/**
* Текущая версия библиотеки
*/
const SDK_VERSION = '2.0.1';
const SDK_VERSION = '2.0.2';
/**
* Получить список платежей магазина.
@@ -57,6 +57,7 @@ abstract class AbstractPaymentResponse extends Payment implements PaymentInterfa
* Конструктор, устанавливает настройки платежа из ассоциативного массива
*
* @param array $paymentInfo Массив с информацией о платеже, пришедший от API
* @throws \Exception
*/
public function __construct($paymentInfo)
{
@@ -130,7 +130,6 @@ class CreatePaymentRequestSerializer
$result['airline']['booking_reference'] = $bookingReference;
}
/** @var PassengerInterface $passenger */
foreach ($airline->getPassengers() as $passenger) {
$result['airline']['passengers'][] = array(
'first_name' => $passenger->getFirstName(),
@@ -138,7 +137,6 @@ class CreatePaymentRequestSerializer
);
}
/** @var LegInterface $leg */
foreach ($airline->getLegs() as $leg) {
$result['airline']['legs'][] = array(
'departure_airport' => $leg->getDepartureAirport(),
@@ -60,6 +60,7 @@ class PaymentsResponse
* Конструктор, устанавливает свойства объекта из пришедшего из API ассоциативного массива
*
* @param array $options Массив настроек, пришедший от API
* @throws \Exception
*/
public function __construct($options)
{
@@ -39,6 +39,7 @@ abstract class AbstractRefundResponse extends Refund
/**
* Конструктор
* @param array $options Ассоциативный массив с информацией, вернувшейся от API
* @throws \Exception
*/
public function __construct($options)
{
+2 -2
View File
@@ -29,9 +29,9 @@ define('YOOKASSA_SDK_PSR_LOG_PATH', dirname(__FILE__).'/../vendor/psr/log/Psr/Lo
function yookassaSdkLoadClass($className)
{
if (strncmp('YooKassa', $className, 14) === 0) {
if (strncmp('YooKassa', $className, 8) === 0) {
$path = YOOKASSA_SDK_ROOT_PATH;
$length = 14;
$length = 8;
} elseif (strncmp('Psr\Log', $className, 7) === 0) {
$path = YOOKASSA_SDK_PSR_LOG_PATH;
$length = 7;
+15 -12
View File
@@ -1,5 +1,6 @@
<?php
namespace Tests\YooKassa\Helpers;
use PHPUnit\Framework\TestCase;
use YooKassa\Helpers\RawHeadersParser;
@@ -8,6 +9,8 @@ class RawHeadersParserTest extends TestCase
{
/**
* @dataProvider headersDataProvider
* @param $rawHeaders
* @param $expected
*/
public function testParse($rawHeaders, $expected)
{
@@ -19,70 +22,70 @@ class RawHeadersParserTest extends TestCase
return array(
array(
'Server: nginx
Date: Thu, 03 Aug 2017 16:04:35 GMT
Date: Thu, 03 Dec 2020 16:04:35 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://insales-dev.yamoney.ru/',
Location: https://yoomoney.ru/',
array(
'Server' => 'nginx',
'Date' => 'Thu, 03 Aug 2017 16:04:35 GMT',
'Date' => 'Thu, 03 Dec 2020 16:04:35 GMT',
'Content-Type' => 'text/html',
'Content-Length' => '178',
'Connection' => 'keep-alive',
'Location' => 'https://insales-dev.yamoney.ru/'
'Location' => 'https://yoomoney.ru/'
),
),
array(
"HTTP/1.1 200 Ok\r\n" .
"Server: nginx\r\n" .
"Date: Thu, 03 Aug 2017 16:04:35 GMT\r\n" .
"Date: Thu, 03 Dec 2020 16:04:35 GMT\r\n" .
"Content-Type: text/html\r\n" .
"Content-Length: 178\r\n" .
"Array-Header: value1\r\n" .
"Connection: keep-alive\r\n" .
"Array-Header: value2\r\n" .
"Location: https://insales-dev.yamoney.ru/\r\n" .
"Location: https://yoomoney.ru/\r\n" .
"\r\n" .
"Content-Length: 132",
array(
0 => 'HTTP/1.1 200 Ok',
'Server' => 'nginx',
'Date' => 'Thu, 03 Aug 2017 16:04:35 GMT',
'Date' => 'Thu, 03 Dec 2020 16:04:35 GMT',
'Content-Type' => 'text/html',
'Content-Length' => '178',
'Array-Header' => array(
'value1', 'value2'
),
'Connection' => 'keep-alive',
'Location' => 'https://insales-dev.yamoney.ru/'
'Location' => 'https://yoomoney.ru/'
),
),
array(
"HTTP/1.1 200 Ok\r\n" .
"Server: nginx\r\n" .
"\tversion 1.3.4\r\n" .
"Date: Thu, 03 Aug 2017 16:04:35 GMT\r\n" .
"Date: Thu, 03 Dec 2020 16:04:35 GMT\r\n" .
"Content-Type: text/html\r\n" .
"Content-Length: 178\r\n" .
"Array-Header: value1\r\n" .
"Connection: keep-alive\r\n" .
"Array-Header: value2\r\n" .
"Location: https://insales-dev.yamoney.ru/\r\n" .
"Location: https://yoomoney.ru/\r\n" .
"Array-Header: value3\r\n" .
"\r\n" .
"Content-Length: 132",
array(
0 => 'HTTP/1.1 200 Ok',
'Server' => "nginx\r\n\tversion 1.3.4",
'Date' => 'Thu, 03 Aug 2017 16:04:35 GMT',
'Date' => 'Thu, 03 Dec 2020 16:04:35 GMT',
'Content-Type' => 'text/html',
'Content-Length' => '178',
'Array-Header' => array(
'value1', 'value2', 'value3',
),
'Connection' => 'keep-alive',
'Location' => 'https://insales-dev.yamoney.ru/'
'Location' => 'https://yoomoney.ru/'
),
),
);