PHP code example of amida-software / alfabank_ua_api

1. Go to this page and download the library: Download amida-software/alfabank_ua_api 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/ */

    

amida-software / alfabank_ua_api example snippets


use Amida\Alfabank;

$service = new Alfabank\Service;
$service->setClient(new \GuzzleHttp\Client());
$service->setPartner('partner');
$service->setUser('partner');
$service->setPassword('!PaRt_Ne09_R#');

$data = new Alfabank\Request\CreateOrderDataSet;
$data->setEmail('[email protected]');
$data->setMPhone('+380671111111');
$data->setPanEnd('9654');
$data->setOrderId('p181');
$data->setOrderSum('121600');
$data->setOrderTerm('9');
$data->setCallBackURL('https://dpartnapu01.alfa.bank.int:8243/installmentseventwo/orders');
$data->setShopId('46546-БwfqК');
$data->setOrderNom(['test']);
$data->setOrderAdd('test');
$data->setOrderVat('test');

$response = $service->createOrder($data);

$statusCode = $response->getStatusCode();
SstatusText = $response->getStatusText();
$messageId = $response->getMessageId();
$orderId = $response->getOrderId();