PHP code example of vanta / kvell-payout-client
1. Go to this page and download the library: Download vanta/kvell-payout-client 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/ */
vanta / kvell-payout-client example snippets
$key = file_get_contents(filename: '<ваш приватный ssl ключ>');
$builder = RestClientBuilder::create(client: new Client(config: []), signKey: new SignKey(value: $key), apiKey: '<Ваш ApiKey>', secretKey: '<Ваш секретный ключ>')
->withEnvironmentStage()
;
$key = file_get_contents(filename: '<ваш приватный ssl ключ>');
$builder = RestClientBuilder::create(client: new Client(config: []), signKey: new SignKey(value: $key), apiKey: '<Ваш ApiKey>', secretKey: '<Ваш секретный ключ>')
->withEnvironmentStage()
;
$result = $builder->createSbpPayoutClient()
->startCheckingPossibleToPay(
new PossibleToPay(
'Шашков Владислав Максимович',
'100000000004',
PhoneNumber::parse('+79994652397'),
new MoneyPositive(Money::RUB(5000))
),
);
$key = file_get_contents(filename: '<ваш приватный ssl ключ>');
$builder = RestClientBuilder::create(client: new Client(config: []), signKey: new SignKey(value: $key), apiKey: '<Ваш ApiKey>', secretKey: '<Ваш секретный ключ>')
->withEnvironmentStage()
;
$result = $builder->createSbpPayoutClient()->getStatusPossibleToPay('170444');
$key = file_get_contents(filename: '<ваш приватный ssl ключ>');
$builder = RestClientBuilder::create(client: new Client(config: []), signKey: new SignKey(value: $key), apiKey: '<Ваш ApiKey>', secretKey: '<Ваш секретный ключ>')
->withEnvironmentStage()
;
$result = $builder->createClassicPayoutClient()->getPayout('b1e8fdb4-6562-4992-a933-cf029f9e31d3');
$key = file_get_contents(filename: '<ваш приватный ssl ключ>');
$builder = RestClientBuilder::create(client: new Client(config: []), signKey: new SignKey(value: $key), apiKey: '<Ваш ApiKey>', secretKey: '<Ваш секретный ключ>')
->withEnvironmentStage()
;
$result = $builder->createClassicPayoutClient()
->createPayoutClassic(
request: new Payout(
description: 'Вывод денег',
transactionId: 'b1e8fdb4-6562-4992-a933-cf029f9e31d3',
amount: new MoneyPositive(value: Money::RUB(100)),
card: new \Vanta\Integration\KvellPayout\Request\Card('4718190802359673'),
)
);