Skip to content

Commit

Permalink
Full rebranding from Yandex.Kassa to YooKassa. Migrating to YooKassa …
Browse files Browse the repository at this point in the history
…API PHP Client Library. All gateway url's was changed.
  • Loading branch information
igor-tv committed May 10, 2021
1 parent 59f6df4 commit eb1653b
Show file tree
Hide file tree
Showing 36 changed files with 207 additions and 305 deletions.
8 changes: 4 additions & 4 deletions .php_cs
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()
Expand Down
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,3 @@ cache:
before_install:
- 'composer self-update'
- 'composer --version'
- 'wget http://hiqdev.com/hidev/hidev.phar -O hidev.phar && chmod a+x hidev.phar'
- './hidev.phar --version'
- './hidev.phar travis/before-install'
sudo: false
install:
- './hidev.phar travis/install'
script:
- './hidev.phar travis/script'
after_script:
- './hidev.phar travis/after-script'
8 changes: 7 additions & 1 deletion CHANGELOG.md
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])
Expand All @@ -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
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# Omnipay: Yandex.Kassa
# Omnipay: YooKassa

**Yandex.Kassa driver for Omnipay payment processing library**
**YooKassa driver for Omnipay payment processing library**

[![Latest Stable Version](https://poser.pugx.org/hiqdev/omnipay-yandex-kassa/v/stable)](https://packagist.org/packages/hiqdev/omnipay-yandex-kassa)
[![Total Downloads](https://poser.pugx.org/hiqdev/omnipay-yandex-kassa/downloads)](https://packagist.org/packages/hiqdev/omnipay-yandex-kassa)
[![Build Status](https://img.shields.io/travis/hiqdev/omnipay-yandex-kassa.svg)](https://travis-ci.org/hiqdev/omnipay-yandex-kassa)
[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/hiqdev/omnipay-yandex-kassa.svg)](https://scrutinizer-ci.com/g/hiqdev/omnipay-yandex-kassa/)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/hiqdev/omnipay-yandex-kassa.svg)](https://scrutinizer-ci.com/g/hiqdev/omnipay-yandex-kassa/)
[![Latest Stable Version](https://poser.pugx.org/hiqdev/omnipay-yookassa/v/stable)](https://packagist.org/packages/hiqdev/omnipay-yookassa)
[![Total Downloads](https://poser.pugx.org/hiqdev/omnipay-yookassa/downloads)](https://packagist.org/packages/hiqdev/omnipay-yookassa)
[![Build Status](https://img.shields.io/travis/hiqdev/omnipay-yookassa.svg)](https://travis-ci.org/igor-tv/omnipay-yookassa)

[Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment
processing library for PHP 7.1+.

This package implements [Yandex.Kassa](https://kassa.yandex.ru/) support for Omnipay.
This package implements [YooKassa](https://yookassa.ru/) support for Omnipay.

## Basic Usage

The following gateway is provided by this package:

* [Yandex.Kassa](https://kassa.yandex.ru/)
* [YooKassa](https://yookassa.ru/)

For general usage instructions, please see the main [Omnipay](https://github.com/omnipay/omnipay) repository.

Expand All @@ -31,5 +29,5 @@ If you want to keep up to date with release anouncements, discuss ideas for the
or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which
you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/hiqdev/omnipay-yandex-kassa/issues),
If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/igor-tv/omnipay-yookassa/issues),
or better yet, fork the library and submit a pull request.
50 changes: 25 additions & 25 deletions src/Gateway.php → YooKassa/Gateway.php
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.
Expand All @@ -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()
Expand Down Expand Up @@ -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));
}

/**
Expand All @@ -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));
}

/**
Expand All @@ -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));
}

/**
Expand All @@ -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;
}
Expand Down
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.
Expand Down Expand Up @@ -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;
}
Expand Down
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;
Expand Down
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.
Expand Down
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;
Expand Down
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.
Expand Down
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;
Expand Down
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;
Expand Down
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;
Expand Down
Loading

0 comments on commit eb1653b

Please sign in to comment.