dnc-grafmen/white-pay-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

dnc-grafmen/white-pay-sdk

Composer 安装命令:

composer require dnc-grafmen/white-pay-sdk

包简介

README 文档

README

Simple PHP sdk for WhitePay api

Installation

composer require dnc-grafmen/white-pay-sdk

Usage

Make the WhitePayClientFactory and call his method create with parameters for create the WhitePayClient

Example

$apikey = 2300142124;
$slug = 'my_super_secret_slug_from_account';
$factory = new \WhitePaySdk\Factory\WhitePayClientFactory();
$clientSandbox = $factory->create($apikey, $slug, new \GuzzleHttp\Client(), \WhitePaySdk\Constants::URL_SANDBOX);
// or for production
$clientProduction = $factory->create($apikey, $slug, new \GuzzleHttp\Client());

The next step - make the factory which implemented the PaymentFactoryInterface.

Example

$factory = new \WhitePaySdk\Factory\CreatePaymentFactory();

And we also need to create a DTO that implements DataDTOInterface

Example

$dto = new \WhitePaySdk\DTO\CreatePaymentDTO(
        new \WhitePaySdk\DTO\TransactionDTO(
            300,
            'USDT',
            '00231'
            'https://my.site.com/payment/ok', 'https://my.site.com/payment/fail'
        )
);

And put this data to client send method.

Example

$response = $client->send($factory, $dto);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-04-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固