forked from hiqdev/omnipay-yandex-kassa
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full rebranding from Yandex.Kassa to YooKassa. Migrating to YooKassa …
…API PHP Client Library. All gateway url's was changed.
- Loading branch information
Showing
36 changed files
with
207 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<?php | ||
|
||
$header = <<<EOF | ||
Yandex.Kassa driver for Omnipay payment processing library | ||
YooKassa driver for Omnipay payment processing library | ||
@link https://github.com/hiqdev/omnipay-yandex-kassa | ||
@package omnipay-yandex-kassa | ||
@link https://github.com/igor-tv/omnipay-yookassa | ||
@package omnipay-yookassa | ||
@license MIT | ||
@copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
@copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
EOF; | ||
|
||
return PhpCsFixer\Config::create() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
## [Under development] | ||
|
||
## [4.0.0] - 2021-05-10 | ||
|
||
- Full rebranding from Yandex.Kassa to YooKassa ([@igor-tv]) | ||
- Migrating to YooKassa API PHP Client Library. All gateway url's was changed. | ||
|
||
## [3.0.2] - 2019-08-06 | ||
|
||
- Fixed `DetailsResponse::getPayer()`: Payment method title might be missing, so a fallback was implemented ([@SilverFire]) | ||
|
@@ -24,8 +29,9 @@ | |
[[email protected]]: https://github.com/tafid | ||
[@BladeRoot]: https://github.com/BladeRoot | ||
[[email protected]]: https://github.com/BladeRoot | ||
[@igor-tv]: https://github.com/igor-tv | ||
[Under development]: https://github.com/hiqdev/omnipay-yandex-kassa/compare/3.0.1...HEAD | ||
[3.0.0]: https://github.com/hiqdev/omnipay-yandex-kassa/releases/tag/3.0.0 | ||
[Development started]: https://github.com/hiqdev/omnipay-yandex-kassa/compare/2.0.0...Development started | ||
[3.0.1]: https://github.com/hiqdev/omnipay-yandex-kassa/compare/3.0.0...3.0.1 | ||
[3.0.2]: https://github.com/hiqdev/omnipay-yandex-kassa/compare/3.0.1...3.0.2 | ||
[4.0.0]: https://github.com/igor-tv/omnipay-yookassa/compare/3.0.2...4.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa; | ||
namespace Omnipay\YooKassa; | ||
|
||
use Omnipay\Common\AbstractGateway; | ||
use Omnipay\Common\Http\ClientInterface; | ||
use Omnipay\YandexKassa\Message\CaptureRequest; | ||
use Omnipay\YandexKassa\Message\CaptureResponse; | ||
use Omnipay\YandexKassa\Message\DetailsRequest; | ||
use Omnipay\YandexKassa\Message\DetailsResponse; | ||
use Omnipay\YandexKassa\Message\IncomingNotificationRequest; | ||
use Omnipay\YandexKassa\Message\PurchaseRequest; | ||
use Omnipay\YooKassa\Message\CaptureRequest; | ||
use Omnipay\YooKassa\Message\CaptureResponse; | ||
use Omnipay\YooKassa\Message\DetailsRequest; | ||
use Omnipay\YooKassa\Message\DetailsResponse; | ||
use Omnipay\YooKassa\Message\IncomingNotificationRequest; | ||
use Omnipay\YooKassa\Message\PurchaseRequest; | ||
use Symfony\Component\HttpFoundation\Request as HttpRequest; | ||
use YandexCheckout\Client; | ||
use YooKassa\Client; | ||
|
||
/** | ||
* Class Gateway. | ||
|
@@ -29,26 +29,26 @@ | |
class Gateway extends AbstractGateway | ||
{ | ||
/** @var Client|null */ | ||
private $yandexClient; | ||
private $yooKassaClient; | ||
|
||
public function __construct(ClientInterface $httpClient = null, HttpRequest $httpRequest = null) | ||
{ | ||
parent::__construct($httpClient, $httpRequest); | ||
} | ||
|
||
protected function getYandexClient(): Client | ||
protected function getYooKassaClient(): Client | ||
{ | ||
if ($this->yandexClient === null) { | ||
$this->yandexClient = new Client(); | ||
$this->yandexClient->setAuth($this->getShopId(), $this->getSecret()); | ||
if ($this->yooKassaClient === null) { | ||
$this->yooKassaClient = new Client(); | ||
$this->yooKassaClient->setAuth($this->getShopId(), $this->getSecret()); | ||
} | ||
|
||
return $this->yandexClient; | ||
return $this->yooKassaClient; | ||
} | ||
|
||
public function getName() | ||
{ | ||
return 'Yandex.Kassa'; | ||
return 'YooKassa'; | ||
} | ||
|
||
public function getShopId() | ||
|
@@ -77,7 +77,7 @@ public function setSecret($value) | |
*/ | ||
public function purchase(array $parameters = []) | ||
{ | ||
return $this->createRequest(PurchaseRequest::class, $this->injectYandexClient($parameters)); | ||
return $this->createRequest(PurchaseRequest::class, $this->injectYooKassaClient($parameters)); | ||
} | ||
|
||
/** | ||
|
@@ -86,7 +86,7 @@ public function purchase(array $parameters = []) | |
*/ | ||
public function capture(array $parameters = []) | ||
{ | ||
return $this->createRequest(CaptureRequest::class, $this->injectYandexClient($parameters)); | ||
return $this->createRequest(CaptureRequest::class, $this->injectYooKassaClient($parameters)); | ||
} | ||
|
||
/** | ||
|
@@ -95,7 +95,7 @@ public function capture(array $parameters = []) | |
*/ | ||
public function details(array $parameters = []) | ||
{ | ||
return $this->createRequest(DetailsRequest::class, $this->injectYandexClient($parameters)); | ||
return $this->createRequest(DetailsRequest::class, $this->injectYooKassaClient($parameters)); | ||
} | ||
|
||
/** | ||
|
@@ -104,12 +104,12 @@ public function details(array $parameters = []) | |
*/ | ||
public function notification(array $parameters = []) | ||
{ | ||
return $this->createRequest(IncomingNotificationRequest::class, $this->injectYandexClient($parameters)); | ||
return $this->createRequest(IncomingNotificationRequest::class, $this->injectYooKassaClient($parameters)); | ||
} | ||
|
||
private function injectYandexClient(array $parameters): array | ||
private function injectYooKassaClient(array $parameters): array | ||
{ | ||
$parameters['yandexClient'] = $this->getYandexClient(); | ||
$parameters['yooKassaClient'] = $this->getYooKassaClient(); | ||
|
||
return $parameters; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa\Message; | ||
namespace Omnipay\YooKassa\Message; | ||
|
||
use YandexCheckout\Client; | ||
use YooKassaCheckout\Client; | ||
|
||
/** | ||
* Class AbstractRequest. | ||
|
@@ -44,7 +44,7 @@ public function setSecret($value) | |
return $this->setParameter('secret', $value); | ||
} | ||
|
||
public function setYandexClient(Client $client): void | ||
public function setYooKassaClient(Client $client): void | ||
{ | ||
$this->client = $client; | ||
} | ||
|
10 changes: 5 additions & 5 deletions
10
src/Message/CaptureRequest.php → YooKassa/Message/CaptureRequest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa\Message; | ||
namespace Omnipay\YooKassa\Message; | ||
|
||
use Omnipay\Common\Exception\InvalidRequestException; | ||
use Throwable; | ||
|
14 changes: 7 additions & 7 deletions
14
src/Message/CaptureResponse.php → YooKassa/Message/CaptureResponse.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa\Message; | ||
namespace Omnipay\YooKassa\Message; | ||
|
||
use Omnipay\Common\Exception\InvalidResponseException; | ||
use YandexCheckout\Model\PaymentStatus; | ||
use YandexCheckout\Request\Payments\Payment\CreateCaptureResponse; | ||
use YooKassaCheckout\Model\PaymentStatus; | ||
use YooKassaCheckout\Request\Payments\Payment\CreateCaptureResponse; | ||
|
||
/** | ||
* Class CaptureResponse. | ||
|
10 changes: 5 additions & 5 deletions
10
src/Message/DetailsRequest.php → YooKassa/Message/DetailsRequest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa\Message; | ||
namespace Omnipay\YooKassa\Message; | ||
|
||
use Omnipay\Common\Exception\InvalidResponseException; | ||
use Omnipay\Common\Message\ResponseInterface; | ||
|
12 changes: 6 additions & 6 deletions
12
src/Message/DetailsResponse.php → YooKassa/Message/DetailsResponse.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa\Message; | ||
namespace Omnipay\YooKassa\Message; | ||
|
||
use Omnipay\Common\Exception\InvalidResponseException; | ||
use Omnipay\Common\Message\AbstractResponse; | ||
use Omnipay\Common\Message\RequestInterface; | ||
use YandexCheckout\Model\PaymentInterface; | ||
use YooKassaCheckout\Model\PaymentInterface; | ||
|
||
/** | ||
* Class DetailsResponse. | ||
|
10 changes: 5 additions & 5 deletions
10
src/Message/IncomingNotificationRequest.php → ...a/Message/IncomingNotificationRequest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa\Message; | ||
namespace Omnipay\YooKassa\Message; | ||
|
||
use Omnipay\Common\Exception\InvalidResponseException; | ||
use Omnipay\Common\Message\ResponseInterface; | ||
|
10 changes: 5 additions & 5 deletions
10
src/Message/IncomingNotificationResponse.php → .../Message/IncomingNotificationResponse.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa\Message; | ||
namespace Omnipay\YooKassa\Message; | ||
|
||
use Omnipay\Common\Message\AbstractResponse; | ||
use Omnipay\Common\Message\RequestInterface; | ||
|
10 changes: 5 additions & 5 deletions
10
src/Message/PurchaseRequest.php → YooKassa/Message/PurchaseRequest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php | ||
/** | ||
* Yandex.Kassa driver for Omnipay payment processing library | ||
* YooKassa driver for Omnipay payment processing library | ||
* | ||
* @link https://github.com/hiqdev/omnipay-yandex-kassa | ||
* @package omnipay-yandex-kassa | ||
* @link https://github.com/igor-tv/omnipay-yookassa | ||
* @package omnipay-yookassa | ||
* @license MIT | ||
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/) | ||
* @copyright Copyright (c) 2021, Igor Tverdokhleb, [email protected] | ||
*/ | ||
|
||
namespace Omnipay\YandexKassa\Message; | ||
namespace Omnipay\YooKassa\Message; | ||
|
||
use Omnipay\Common\Exception\InvalidRequestException; | ||
use Throwable; | ||
|
Oops, something went wrong.