承接 yuriizee/sensebank-installment-sdk 相关项目开发

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

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

yuriizee/sensebank-installment-sdk

最新稳定版本:v1.2.0

Composer 安装命令:

composer require yuriizee/sensebank-installment-sdk

包简介

PHP SDK library for Sensebank installment

README 文档

README

Tests Total Downloads Latest Stable Version License

This library provides a clean, flexible and robust way to integrate with the SenseBank Installment SDK. It wraps up various SDK features into easy-to-use PHP classes and methods, minimizing the effort required to interact with the SDK and improving the maintainability of your project.

Installation

composer require yuriizee/sensebank-installment-sdk

Features

Below are some features provided by this library:

  • Order creation/cancellation (Order class)
  • Statement management (Statement class)
  • Managing guarantees (Guarantee class)
  • Singleton client access (InstallmentSDK class)

Requirements

  • PHP >= 8.2

API Documentation

Link to detailed API documentation.

Usage

<?php

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;

require __DIR__ . '/../vendor/autoload.php';

$config = new Config(
    url: 'https://retailapi.sensebank.com.ua:8243/api/PartnerInstallment/v1.0/',
    partnerId: 'partner',
    password: '!PaRt_Ne09_R#'
);
/**
 * You can create instance with own Psr\Http\Client\ClientInterface implemented class
 */
$client = (new Client($config))->getClient();

$sdk = InstallmentSDK::getInstance($config, $client);

$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: 'test@example.dev'
);

$response = $sdk->order()->createOrder($request);

License

SENSEBANK INSTALLMENT SDK PHP Library is open source software licensed under MIT

Config Class

Config class is used to set the configuration for the API client:

  • url
  • partnerId
  • password

These parameters should be obtained directly from Sens Bank

Contributing

Contributions are welcome! Please feel free to open issues for bug reports, feature requests or submit a pull request.

Contact information

yuriyzee@gmail.com

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固