PHPackages                             itelmenko/php-ucscards-client - 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. [API Development](/categories/api)
4. /
5. itelmenko/php-ucscards-client

ActiveLibrary[API Development](/categories/api)

itelmenko/php-ucscards-client
=============================

Ucscards API Client PHP library

v1.0.1(7y ago)0613MITPHPPHP &gt;=7.2.0

Since Apr 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/itelmenko/php-ucscards-client)[ Packagist](https://packagist.org/packages/itelmenko/php-ucscards-client)[ Docs](https://github.com/itelmenko/php-ucscards-client)[ RSS](/packages/itelmenko-php-ucscards-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Paddle.com API Client PHP library
---------------------------------

[](#paddlecom-api-client-php-library)

This library provides convenient way of querying [UCS cards](https://ucscards.ru) API from php code.

Requirements
------------

[](#requirements)

PHP 7.2 or later.

Installation via Composer
-------------------------

[](#installation-via-composer)

```
composer require itelmenko/php-ucscards-client
```

Usage
-----

[](#usage)

### Register a payment

[](#register-a-payment)

```
$settings = [
    'shop_id' => 111111, // Your shop's ID
    'soap' => [
        'login' => 'your-login',
        'password' => 'your-password',
        'location' => 'https://tws.egopay.ru/',
        'uri' => 'http://yourdomain.com',
        'trace'    => 1,
        'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
        'connection_timeout' => 12
    ]
];

$soapClient = new \UcsCards\Client(null, $settings['soap']);

$order = new \UcsCards\Order\OrderId();
$order->shop_id = $settings['shop_id'];
$order->number = 2323443; // Your shop's order ID

$cost = new \UcsCards\Cost();
$cost->amount = 345.67; // Order price
$cost->currency = 'RUB';

$customer = new \UcsCards\Customer();
$customer->id = 'Customer01'; // Customer's ID
$customer->email = 'customer01@gmail.com'; // Customer's email

$description = new \UcsCards\Order\OrderDescription();
$description->paytype = 'card';

$postData = new \UcsCards\PostData\PostData();
$returnUrlOk = new \UcsCards\PostData\PostEntry();
$returnUrlOk->name = \UcsCards\PostData\PostEntry::ENTRY_NAME_RETURN_URL_OK;
$returnUrlOk->value = 'https://yourdomain.com/return';
$postData->addEntry($returnUrlOk);

$returnUrlFault = new \UcsCards\PostData\PostEntry();
$returnUrlFault->name = \UcsCards\PostData\PostEntry::ENTRY_NAME_RETURN_URL_FAULT;
$returnUrlFault->value = 'https://yourdomain.com/fail';
$postData->addEntry($returnUrlFault);

$request = new \UcsCards\Request\Register();
$request->order = $order;
$request->cost = $cost;
$request->customer = $customer;
$request->description = $description;
$request->postdata = $postData->result();

echo "Data: ".json_encode($request).PHP_EOL;

try {
    $info = $soapClient->register($request);
    echo "Result: ".json_encode($info).PHP_EOL;
    $redirectUrl = "{$info->redirect_url}?session={$info->session}";
    echo "Here we need redirect a customer to ".$redirectUrl.PHP_EOL;
    return $redirectUrl;
} catch (\SoapFault $fault) {
    echo "SOAP error. ".$fault->faultcode.': '.$fault->faultstring.PHP_EOL;
} catch (\Exception $fault) {
    echo "PHP Exception: ".$fault->__toString().PHP_EOL;
}
```

### Get payment's information

[](#get-payments-information)

```
$order = new \UcsCards\Order\OrderId();
$order->shop_id = $settings['shop_id'];
$order->number = 2323443; // Your shop's order ID
$request = new \UcsCards\Request\GetByOrder();
$request->order = $order;

try {
    $info = $soapClient->get_by_order($request);
    echo 'Result: '.json_encode($info).PHP_EOL;
} catch (\SoapFault $fault) {
    echo "SOAP error: [{$fault->faultcode}] - {$fault->faultstring}".PHP_EOL;
} catch (\Exception $fault) {
    echo 'PHP Exception: '.$fault->__toString().PHP_EOL;
}
```

### Charge a recurrent payment in subscriptions

[](#charge-a-recurrent-payment-in-subscriptions)

```
$soapClient = new \UcsCards\Client(null, $settings['soap']);
$order = new \UcsCards\Order\OrderId();
$order->shop_id = $settings['shop_id'];
$order->number = 2323443; // ID of initial payment;

$cost = new \UcsCards\Cost();
$cost->amount = '123.45'; // Recurrent payment price
$cost->currency = 'RUB;

$request = new \UcsCards\Request\Charge();

$request->order = $order;
$request->cost = $cost;
$request->token = "9846594309t53ncw"; // Customer's card token (from result of get_by_order query)
$request->txn_id = 2323449; // Recurrent payment ID

echo "Data ".json_encode($request).PHP_EOL;

try {
    $info = $soapClient->charge((object) $request);
    echo "Result: ".json_encode($info).PHP_EOL;
} catch (\SoapFault $fault) {
    echo "SOAP error: [{$fault->faultcode}] - {$fault->faultstring}".PHP_EOL;
} catch (\Exception $fault) {
    echo 'PHP Exception: '.$fault->__toString().PHP_EOL;
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

2

Last Release

2578d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/41b594912918f5f6904bcee79f1b5056b913a4a7b000c121baa3cd5dcfe8345c?d=identicon)[itelmenko](/maintainers/itelmenko)

---

Top Contributors

[![itelmenko](https://avatars.githubusercontent.com/u/495449?v=4)](https://github.com/itelmenko "itelmenko (3 commits)")

### Embed Badge

![Health badge](/badges/itelmenko-php-ucscards-client/health.svg)

```
[![Health](https://phpackages.com/badges/itelmenko-php-ucscards-client/health.svg)](https://phpackages.com/packages/itelmenko-php-ucscards-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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