1. Go to this page and download the library: Download vanta/b2pos-soap-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 / b2pos-soap-client example snippets
declare(strict_types=1);
$psr18Client = new Psr18Client();
$soapClientBuilder = SoapClientBuilder::create($psr18Client, 'yourUserId', 'yourUserToken');
$request = new NewLoanApplicationRequestShort(
userInn: '123456789012',
lastname: 'clientLastName',
firstname: 'clientFirstName',
secondname: 'clientSecondName',
phoneNumber: PhoneNumber::parse('+79611234567'),
comment: 'someComment',
firstPaymentAmount: new MoneyPositiveOrZero('15000000'),
russianPassportDocument: new RussianPassportDocument(
new RussianPassportSeries('1234'),
new RussianPassportNumber('123456'),
),
loanPeriodInMonths: 10,
requestId:'someRequestId',
pointOfSaleId: '123',
loanType: LoanTypeShort::LOAN,
basketProducts: [new BasketProduct(
'someBasketProductName',
new MoneyPositiveOrZero('15000000'),
'someBasketProductModel',
'someBasketProductBrand',
)],
);
$response = $soapClientBuilder
->createLoanApplicationClient()
->newLoanApplicationShort($request)
;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.