承接 polopolaw/fkwallet 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

polopolaw/fkwallet

最新稳定版本:1.1.0

Composer 安装命令:

composer require polopolaw/fkwallet

包简介

Laravel package for fkwallet.io API integration

README 文档

README

Laravel package for integration with fkwallet.io API.

Quick Start

Using Facade

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'
));

Using Proxy

You can specify a proxy for requests in two ways:

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

Using Custom Credentials

Override configured keys at runtime:

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

Using Service

use Polopolaw\FKWallet\Contracts\FKWalletServiceInterface;

$service = app(FKWalletServiceInterface::class);
$balance = $service->getBalance();

Installation

Install the package via Composer:

composer require polopolaw/fkwallet

Configuration

Publish the configuration file:

php artisan vendor:publish --provider="Polopolaw\FKWallet\FKWalletServiceProvider" --tag="config"

Add the following to your .env file:

FKWALLET_API_URL=https://api.fkwallet.io/v1/
FKWALLET_PUBLIC_KEY=your_public_key_here
FKWALLET_PRIVATE_KEY=your_private_key_here
FKWALLET_TIMEOUT=30
FKWALLET_RETRY_ATTEMPTS=3

Available Methods

Note: All methods use the FKWALLET_PUBLIC_KEY and FKWALLET_PRIVATE_KEY from your configuration file. Or you can pass as a parameter keys.

GET Methods

  • getBalance() - Get wallet balance
  • getHistory(?string $dateFrom, ?string $dateTo, int $page, int $limit) - Get transaction history
  • getCurrencies() - Get list of currencies
  • getPaymentSystems() - Get payment systems
  • getSbpList() - Get SBP banks list
  • getMobileCarrierList() - Get mobile carriers list
  • getWithdrawalStatus(string $orderId, OrderStatusType $type) - Get withdrawal status
  • getTransferStatus(int $id) - Get transfer status
  • getOnlineProductCategories() - Get online product categories
  • getOnlineProducts(int $categoryId) - Get online products
  • getOnlineOrderStatus(string $orderId) - Get online order status

POST Methods

  • createWithdrawal(WithdrawalRequest $request) - Create withdrawal
  • createTransfer(TransferRequest $request) - Create transfer
  • createOnlineOrder(OnlineOrderRequest $request) - Create online order

Documentation

For detailed documentation, see the docs directory.

To generate Docusaurus documentation:

cd docs
npm install
npm start

Testing

Run tests with Pest:

composer test

Requirements

  • PHP 8.1+
  • Laravel 9.0+ | 10.0+ | 11.0+

License

MIT

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-08