1. Go to this page and download the library: Download rusproj/uniteller-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rusproj / uniteller-php-sdk example snippets
$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');
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();
$uniteller->payment([
'Order_IDP' => mt_rand(10000, 99999),
// ... other parameters
])->go();
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);