PHP code example of yuriizee / sensebank-installment-sdk
1. Go to this page and download the library: Download yuriizee/sensebank-installment-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/ */
yuriizee / sensebank-installment-sdk example snippets
declare(strict_types=1);
use Yuriizee\SenseBankInstallmentSDK\Client;
use Yuriizee\SenseBankInstallmentSDK\Config;
use Yuriizee\SenseBankInstallmentSDK\DataObjects\Order\CreateOrderRequest;
use Yuriizee\SenseBankInstallmentSDK\Enums\OrderLimits;
use Yuriizee\SenseBankInstallmentSDK\Helper\Money;
use Yuriizee\SenseBankInstallmentSDK\InstallmentSDK;
$request = new CreateOrderRequest(
mPhone: '+380670000000',
panEnd: '0000',
orderId: rand(),
orderSum: Money::toKopecks(
rand(OrderLimits::MIN_SUM->value, OrderLimits::MAX_SUM->value)
),
orderTerm: rand(2, 5),
callBackURL: 'https://example.dev',
eMailPartner: '[email protected]'
);
$response = $sdk->order()->createOrder($request);