All Projects → tmconsulting → uniteller-php-sdk

tmconsulting / uniteller-php-sdk

Licence: MIT license
PHP (7.2+) SDK for integration internet-acquiring of the Uniteller (unofficial)

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to uniteller-php-sdk

Payment
💰 A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.
Stars: ✭ 467 (+2123.81%)
Mutual labels:  payment, payments
Offline
[READ-ONLY] Subtree split of the Payum Offline Component -- clone into Payum/Offline/ (master at payum/payum)
Stars: ✭ 25 (+19.05%)
Mutual labels:  payment, payum
Paypal Checkout Components
Javascript Integration for PayPal Button and PayPal Checkout
Stars: ✭ 938 (+4366.67%)
Mutual labels:  payment, payments
Mojaloop
Starting point for on-boarding and contribution documentation for mojaloop
Stars: ✭ 267 (+1171.43%)
Mutual labels:  payment, payments
Raiden
Raiden Network
Stars: ✭ 1,825 (+8590.48%)
Mutual labels:  payment, payments
Sdk Php
PHP SDK for Authorize.Net API
Stars: ✭ 343 (+1533.33%)
Mutual labels:  payment, payments
Openfintech
Opensource FinTech standards & payment provider data
Stars: ✭ 87 (+314.29%)
Mutual labels:  payment, payments
adyen-dotnet-api-library
Adyen API Library for .NET
Stars: ✭ 69 (+228.57%)
Mutual labels:  payment, payments
Laravel Paddle
Paddle.com API integration for Laravel with support for webhooks/events
Stars: ✭ 132 (+528.57%)
Mutual labels:  payment, payments
Sdk Dotnet
.Net SDK for Authorize.Net API
Stars: ✭ 124 (+490.48%)
Mutual labels:  payment, payments
In App Payments Flutter Plugin
Flutter Plugin for Square In-App Payments SDK
Stars: ✭ 256 (+1119.05%)
Mutual labels:  payment, payments
terms-dictionary
Simple definitions of terms, acronyms, abbreviations, companies, and projects related to financial services and Moov.
Stars: ✭ 48 (+128.57%)
Mutual labels:  payment, payments
cybersource-android-sdk
The CyberSource InApp SDK enables developers to simply and securely incorporate mobile payments into their Android applications.
Stars: ✭ 25 (+19.05%)
Mutual labels:  payment, payments
Gringotts
A complete payment library for Elixir and Phoenix Framework
Stars: ✭ 396 (+1785.71%)
Mutual labels:  payment, payments
paymentgateway
Dokumentace ČSOB platební brány a jejího eAPI pro platby platebními kartami, Apple Pay, mallpay a platebními tlačítky ČSOB.
Stars: ✭ 104 (+395.24%)
Mutual labels:  payment, payments
Adyen Ruby Api Library
Adyen API Library for Ruby
Stars: ✭ 35 (+66.67%)
Mutual labels:  payment, payments
drf-stripe-subscription
An out-of-box Django REST framework solution for payment and subscription management using Stripe.
Stars: ✭ 42 (+100%)
Mutual labels:  payment, payments
PayumYiiExtension
Rich payment solutions for Yii framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
Stars: ✭ 13 (-38.1%)
Mutual labels:  payment, payum
Adyen Php Api Library
Adyen API Library for PHP
Stars: ✭ 93 (+342.86%)
Mutual labels:  payment, payments
Easyupipayment Android
📱Android Library to implement UPI Payment integration easily in Android App 💳💸
Stars: ✭ 219 (+942.86%)
Mutual labels:  payment, payments

Uniteller PHP SDK





PHP (7.2+) SDK for integration internet-acquiring of the Uniteller (unofficial). This documentation is available in Russian language. Also, this SDK integrated with Payum library and you can use gateway.

Features:

  • payment (method pay)
  • recurrent (method recurrent)
  • cancel (method unblock)
  • receive results
  • callback (method for verify incoming signature)
  • general error handler for any request
  • general statuses (In the requests/responses may to meet canceled or cancelled variants. They will be converted to general status like as cancelled.)

TODO:

  • translate to English comments and system (error) messages
  • validation
  • implement method card
  • implement method confirm

Install

For install package follow this command:

composer require tmconsulting/uniteller-php-sdk

Usage

A few usage example the current SDK your can found on the examples folder. Just follow instruction on README.md file.

Configure credentials

<?php
$uniteller = new \Tmconsulting\Uniteller\Client();
$uniteller->setShopId('you_shop_id');
$uniteller->setLogin('you_login_number');
$uniteller->setPassword('you_password');
$uniteller->setBaseUri('https://wpay.uniteller.ru');

Redirect to page payment

So, for redirect to page your enough to run payment method with parameters like as:

<?php
use Tmconsulting\Uniteller\Payment\PaymentBuilder;

$builder = new PaymentBuilder();
$builder
    ->setOrderIdp(mt_rand(10000, 99999))
    ->setSubtotalP(10)
    ->setCustomerIdp(mt_rand(10000, 99999))
    ->setUrlReturnOk('http://google.ru/?q=success')
    ->setUrlReturnNo('http://google.ru/?q=failure');

$uniteller->payment($builder)->go();
// if you don't need redirect
// $uniteller->payment($builder)->getUri();

or use plain array

<?php
$uniteller->payment([
    'Order_IDP' => mt_rand(10000, 99999),
    // ... other parameters
])->go();

Recurrent payment

<?php
use Tmconsulting\Uniteller\Recurrent\RecurrentBuilder;

$builder = (new RecurrentBuilder())
    ->setOrderIdp(mt_rand(10000, 99999))
    ->setSubtotalP(15)
    ->setParentOrderIdp(00000) // order id of any past payment
    ->setParentShopIdp($uniteller->getShopId()); // optional

$results = $uniteller->recurrent($builder);

or use plain array

<?php
$results = $uniteller->recurrent([
    'Order_IDP' => mt_rand(10000, 99999),
    // ... other parameters
]);

Cancel payment

<?php
use Tmconsulting\Uniteller\Cancel\CancelBuilder;

$builder = (new CancelBuilder())->setBillNumber('RRN Number, (12 digits)');
$results = $uniteller->cancel($builder);

or

<?php
use Tmconsulting\Uniteller\Order\Status;

$results = $uniteller->cancel([
    'Billnumber' => 'RRN Number, (12 digits)',
    // ...
]);

foreach ($results as $payment) {
    // see Tmconsulting\Uniteller\Order\Order for other methods.
    if ($payment->getStatus() === Status::CANCELLED) {
        // payment was cancelled
    }    
} 

Receive results

<?php

$results = $uniteller->results([
    'ShopOrderNumber' => 'Order_IDP number'
]);

var_dump($results);

// $results[0]->getCardNumber();

Callback (gateway notification)

Receive incoming parameters from gateway and verifying signature.

<?php
if (! $uniteller->verifyCallbackRequest(['all_parameters_from_post_with_signature'])) {
    return 'invalid_signature';
}

Tests

vendor/bin/phpunit

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].