PHPackages                             avto-dev/cloud-payments-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. avto-dev/cloud-payments-laravel

ActiveLibrary[Payment Processing](/categories/payments)

avto-dev/cloud-payments-laravel
===============================

Cloud Payments PHP-client

v1.9.0(11mo ago)316.5k6[1 issues](https://github.com/avto-dev/cloud-payments-laravel/issues)[2 PRs](https://github.com/avto-dev/cloud-payments-laravel/pulls)MITPHPPHP ^8.2CI failing

Since Dec 2Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/avto-dev/cloud-payments-laravel)[ Packagist](https://packagist.org/packages/avto-dev/cloud-payments-laravel)[ RSS](/packages/avto-dev-cloud-payments-laravel/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (9)Versions (16)Used By (0)

 [![logo](https://camo.githubusercontent.com/8137e50bb73841c6de7d3fe629a54b27779bf21bb4e5305ac3c851348e24f8e7/68747470733a2f2f6873746f2e6f72672f776562742f71372f686b2f6b752f7137686b6b7566616568783976632d737435716e7377375f69376f2e706e67)](https://camo.githubusercontent.com/8137e50bb73841c6de7d3fe629a54b27779bf21bb4e5305ac3c851348e24f8e7/68747470733a2f2f6873746f2e6f72672f776562742f71372f686b2f6b752f7137686b6b7566616568783976632d737435716e7377375f69376f2e706e67)

Cloud Payments PHP-client
=========================

[](#cloud-payments-php-client)

[![Version](https://camo.githubusercontent.com/faef9dbf52d9922e1b92896ef853e40470dfbdd898e5b87cd6908b95d41a1d50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2e7376673f6d61784167653d313830)](https://packagist.org/packages/avto-dev/cloud-payments-laravel)[![PHP Version](https://camo.githubusercontent.com/4e8a59e5b0f1c64b6a837c5ec316e8e3fbb1c8f9d24220d3c2335618afac7167/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2e7376673f6c6f6e6743616368653d74727565)](https://packagist.org/packages/avto-dev/cloud-payments-laravel)[![Build Status](https://camo.githubusercontent.com/b18d3cdc0febc8569f841b00685071a860a81e32e78f8aa2ca23296535fa2366/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2f74657374732e796d6c)](https://github.com/avto-dev/cloud-payments-laravel/actions)[![Coverage](https://camo.githubusercontent.com/c5dd3a51fe0cfda7dff97b56eca6960d4e73f6a8bb22ab25dd10720d64e2a711/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2f6d61737465722e7376673f6d61784167653d3630)](https://codecov.io/gh/avto-dev/cloud-payments-laravel/)[![Downloads count](https://camo.githubusercontent.com/9250435d00b25b683d39a6648c15c47f0c00deac62b24f6e0ceffecc147b9c0b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2e7376673f6d61784167653d313830)](https://packagist.org/packages/avto-dev/cloud-payments-laravel)[![License](https://camo.githubusercontent.com/74c5b90e28e488e921ae593888dc7afde8ac0048940d9b887e0bad74396d515f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2e7376673f6c6f6e6743616368653d74727565)](https://github.com/avto-dev/cloud-payments-laravel/blob/master/LICENSE)

The package provides easy way to use [Cloud Payments API](https://developers.cloudpayments.ru/#api).

Install
-------

[](#install)

Require this package with composer using the following command:

```
$ composer require avto-dev/cloud-payments-laravel
```

> Installed `composer` is required ([how to install composer](https://getcomposer.org/download/)).

Configuration
-------------

[](#configuration)

> You can find laravel framework integration [here](#frameworks-integration)

For client configuration use `Config` instance. Client constructor requires **Public ID** and **API Secret** that you can find in ClodPayments personal area.

```
use AvtoDev\CloudPayments\Config;

$config = new Config('pk_some_key', 'some_api_key');
```

Usage
-----

[](#usage)

Select one of [requset builders](#request-builders):

```
$request_builder = new \AvtoDev\CloudPayments\Requests\Payments\Cards\CardsAuthRequestBuilder;
```

Set all necessary parameters through the setters:

```
/** @var $request_builder \AvtoDev\CloudPayments\Requests\AbstractRequestBuilder */

$request_builder->setAccountId('some_id');
$request_builder->setName('name');
```

Get PSR7 request:

```
/** @var \AvtoDev\CloudPayments\Requests\AbstractRequestBuilder $request_builder */
/** @var \Psr\Http\Message\RequestInterface $request */

$request = $request_builder->buildRequest();
```

Set up client, and send the request:

```
$client = new \AvtoDev\CloudPayments\Client(
    new \GuzzleHttp\Client,
    new \AvtoDev\CloudPayments\Config('public_id', 'api_key')
);

/** @var \Psr\Http\Message\RequestInterface $request */
$response = $client->send($request);
```

Api client
----------

[](#api-client)

### Constructing

[](#constructing)

Constructor requires any `GuzzleHttp\ClientInterface` instance and `Config` instance

```
/** @var \AvtoDev\CloudPayments\Config $config */

use AvtoDev\CloudPayments\Client;
use GuzzleHttp\Client as GuzzleClient;

$client = new Client(new GuzzleClient, $config);
```

### Sending

[](#sending)

This method allows to send any `Psr\Http\Message\RequestInterface` and returns only `Psr\Http\Message\ResponseInterface`, that allow you to build own requests as you want or use one of provided requests builders.

This client does only one thing: authorizes requests for CloudPayments and sends them.

```
$request = new \GuzzleHttp\Psr7\Request('POST','https://api',[],'{"foo":"bar"}');

/** @var \AvtoDev\CloudPayments\Client $client */
$response = $client->send($request);
```

Request builders
----------------

[](#request-builders)

Supported builders:

BuilderDescriptionDocumentation link`TestRequestBuilder`The method to test the interaction with the API[Link](https://developers.cloudpayments.ru/en/#test-method)`CardsAuthRequestBuilder`The method to make a payment by a cryptogram[Link](https://developers.cloudpayments.ru/en/#payment-by-a-cryptogram)`CardsChargeRequestBuilder`The method to make a payment by a cryptogram. Charge only[Link](https://developers.cloudpayments.ru/en/#payment-by-a-cryptogram)`CardsPost3DsRequestBuilder`3-D Secure Processing[Link](https://developers.cloudpayments.ru/en/#3-d-secure-processing)`TokensAuthRequestBuilder`The method to make a payment by a token[Link](https://developers.cloudpayments.ru/en/#payment-by-a-token-recurring)`TokensChargeRequestBuilder`The method to make a payment by a token. Charge only[Link](https://developers.cloudpayments.ru/en/#payment-by-a-token-recurring)`PaymentsConfirmRequestBuilder`Payment Confirmation[Link](https://developers.cloudpayments.ru/en/#payment-confirmation)`PaymentsVoidRequestBuilder`Payment Cancellation[Link](https://developers.cloudpayments.ru/en/#payment-cancellation)`SubscriptionsCreateRequestBuilder`Creation of Subscriptions on Recurrent Payments[Link](https://developers.cloudpayments.ru/en/#creation-of-subscriptions-on-recurrent-payments)`SubscriptionsGetRequestBuilder`Subscription Details[Link](https://developers.cloudpayments.ru/en/#subscription-details)`SubscriptionsFindRequestBuilder`Subscriptions Search[Link](https://developers.cloudpayments.ru/en/#subscriptions-search)`SubscriptionsUpdateRequestBuilder`Recurrent Payments Subscription Change[Link](https://developers.cloudpayments.ru/en/#recurrent-payments-subscription-change)`SubscriptionsCancelRequestBuilder`Subscription on Recurrent Payments Cancellation[Link](https://developers.cloudpayments.ru/en/#subscription-on-recurrent-payments-cancellation)> How to get [card cryptogram packet](https://developers.cloudpayments.ru/#skript-checkout)?

### Idempotency

[](#idempotency)

**Idempotency** is an ability of API to produce the same result as the first one without re-processing in case of repeated requests. That means you can send several requests to the system with the same identifier, and only one request will be processed. All the responses will be identical. Thus the protection against network errors is implemented which can lead to creation of duplicate records and actions.

To enable idempotency, it is necessary to call `setRequestId('request_id')` method with a unique identifier in API request. Generation of request identifier remains on your side - it can be a guid, a combination of an order number, date and amount, or other values of your choice. Each new request that needs to be processed must include new `request_id` value. The processed result is stored in the system for 1 hour.

Frameworks integration
----------------------

[](#frameworks-integration)

### Laravel

[](#laravel)

Laravel 5.5 and above uses Package Auto-Discovery, so doesn't require you to manually register the service-provider. Otherwise you must add the service provider to the `providers` array in `./config/app.php`:

```
'providers' => [
    // ...
    AvtoDev\CloudPayments\Frameworks\Laravel\ServiceProvider::class,
]
```

#### Laravel configuration

[](#laravel-configuration)

Service provider pick configuration from `services.cloud_payments` config. So you need to put it into `config/services.php` file. For example:

```
return [
    // ...
    /*
    |--------------------------------------------------------------------------
    | CloudPayments Settings
    |--------------------------------------------------------------------------
    | - `public_id` (string) - Public ID  (You can find it in personal area)
    | - `api_key`   (string) - API Secret (You can find it in personal area)
    |
    */
    'cloud_payments' => [
        'public_id' => env('CLOUD_PAYMENTS_PUBLIC_ID', 'some id'),
        'api_key'   => env('CLOUD_PAYMENTS_API_KEY', 'some api key'),
    ],
];
```

Testing
-------

[](#testing)

For package testing we use `phpunit` framework. Just write into your terminal:

```
$ make build
$ make install
$ make test
```

Changes log
-----------

[](#changes-log)

[![Release date](https://camo.githubusercontent.com/c6665158d20ece8002d218ce0a000bb820a0c93aa3476b7352b69e2506fa9ae2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2e7376673f7374796c653d666c61742d737175617265266d61784167653d313830)](https://github.com/avto-dev/cloud-payments-laravel/releases)[![Commits since latest release](https://camo.githubusercontent.com/e6c3a750e18411d3877ce3705f8390a032de37009d215a345bb7639bda026a00/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d6974732d73696e63652f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2f6c61746573742e7376673f7374796c653d666c61742d737175617265266d61784167653d313830)](https://github.com/avto-dev/cloud-payments-laravel/commits)

Changes log can be [found here](https://github.com/avto-dev/cloud-payments-laravel/blob/master/CHANGELOG.md).

Support
-------

[](#support)

[![Issues](https://camo.githubusercontent.com/884ea6a2702d406b36832af7c5960a6d24db1dbacb711c0c105fbac311fb8330/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2e7376673f7374796c653d666c61742d737175617265266d61784167653d313830)](https://github.com/avto-dev/cloud-payments-laravel/issues)[![Issues](https://camo.githubusercontent.com/4e9366bf2eefa44d837e060aa6578516507a70f44c261174fecd7c4d95d8f8bb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6176746f2d6465762f636c6f75642d7061796d656e74732d6c61726176656c2e7376673f7374796c653d666c61742d737175617265266d61784167653d313830)](https://github.com/avto-dev/cloud-payments-laravel/pulls)

If you will find any package errors, please, [make an issue](https://github.com/avto-dev/cloud-payments-laravel/issues/new) in current repository.

License
-------

[](#license)

This is open-sourced software licensed under the [MIT License](https://github.com/avto-dev/cloud-payments-laravel/blob/master/LICENSE).

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance44

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~145 days

Recently: every ~218 days

Total

15

Last Release

358d ago

Major Versions

v0.1.0-RC1 → v1.0.02020-06-28

PHP version history (8 changes)v0.0.1-RC1PHP &gt;=7.1

v0.0.2-RC1PHP &gt;=7.1.3

v1.0.0PHP ^7.2

v1.2.0PHP ^7.2 || ^8.0

v1.3.0PHP ^7.3 || ^8.0

v1.5.0PHP ^8.0

v1.8.0PHP ^8.1

v1.9.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6119929?v=4)[Eldario](/maintainers/eldario)[@eldario](https://github.com/eldario)

![](https://avatars.githubusercontent.com/u/52275?v=4)[Zaboday](/maintainers/zaboday)[@Zaboday](https://github.com/Zaboday)

---

Top Contributors

[![jetexe](https://avatars.githubusercontent.com/u/4963272?v=4)](https://github.com/jetexe "jetexe (17 commits)")[![gomzyakov](https://avatars.githubusercontent.com/u/1460709?v=4)](https://github.com/gomzyakov "gomzyakov (6 commits)")[![eldario](https://avatars.githubusercontent.com/u/6119929?v=4)](https://github.com/eldario "eldario (6 commits)")[![tarampampam](https://avatars.githubusercontent.com/u/7326800?v=4)](https://github.com/tarampampam "tarampampam (5 commits)")[![IgorKorytin](https://avatars.githubusercontent.com/u/56302950?v=4)](https://github.com/IgorKorytin "IgorKorytin (2 commits)")[![IlyaKislitsin](https://avatars.githubusercontent.com/u/26906044?v=4)](https://github.com/IlyaKislitsin "IlyaKislitsin (2 commits)")[![helloween141](https://avatars.githubusercontent.com/u/6762347?v=4)](https://github.com/helloween141 "helloween141 (1 commits)")

---

Tags

cloud-paymentslaravellaravelcloud-payments

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/avto-dev-cloud-payments-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/avto-dev-cloud-payments-laravel/health.svg)](https://phpackages.com/packages/avto-dev-cloud-payments-laravel)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M396](/packages/drupal-core-recommended)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k35](/packages/civicrm-civicrm-core)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[srmklive/paypal

PayPal REST API client for Laravel and standalone PHP.

1.1k4.0M29](/packages/srmklive-paypal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
