PHP code example of polopolaw / fkwallet

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

    

polopolaw / fkwallet example snippets


use Polopolaw\FKWallet\Facades\FKWallet;

$balance = FKWallet::getBalance();

$currencies = FKWallet::getCurrencies();

$withdrawal = FKWallet::createWithdrawal(new \Polopolaw\FKWallet\DTO\Requests\WithdrawalRequest(
    new \Polopolaw\FKWallet\ValueObjects\Amount(100.0),
    new \Polopolaw\FKWallet\ValueObjects\CurrencyId(1),
    new \Polopolaw\FKWallet\ValueObjects\PaymentSystemId(5),
    '79261234567',
    1,
    'unique_order_id'
));

$balance = FKWallet::proxy('http://proxy.example.com:8080')->getBalance();

$balance = FKWallet::withCredentials('public_key', 'private_key')->getBalance();

use Polopolaw\FKWallet\Contracts\FKWalletServiceInterface;

$service = app(FKWalletServiceInterface::class);
$balance = $service->getBalance();
bash
php artisan vendor:publish --provider="Polopolaw\FKWallet\FKWalletServiceProvider" --tag="config"