poool/subscribe-sdk 问题修复 & 功能扩展

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

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

poool/subscribe-sdk

Composer 安装命令:

composer require poool/subscribe-sdk

包简介

Poool Subscribe SDK for PHP 🚀

README 文档

README

Poool Subscribe SDK for PHP 🚀

Installation

composer require poool/subscribe-sdk

Usage

use Poool\Subscribe\SDK\Client;

$client = new Client([
    'clientId' => 'yourClientId',
    'clientSecret' => 'yourClientSecret',
]);
var_dump($client->offers->list());

Documentation

https://poool.dev/docs/subscribe/server

Sandbox mode

You can use the sandbox mode to test your integration without any real payment. Pass the sandbox: true request option (last parameter) to any method of the SDK to use it:

$client->offers->list(1, 10, [], [], 'active', ['sandbox' => true]);

Migrations

v1 to v2

  • Now requires php >= 8.1
  • customers.switchSubscriptionOffer(customerId, subscriptionId, offer, requestOptions) becomes customers.switchSubscriptionOffer(customerId, subscriptionId, offer, **{ priceId }**, requestOptions) -> it now takes an additional parameter before request options to speficy offer options like price id
  • sandbox: true|false is now an option on every request (instead of only offers list) and has been removed from offers.list()
  • offers.list(page, count, status, include, exclude) becomes offers.list(page, count, include, exclude, **status**, requestOptions) -> it is moved to the end of the parameters list to be consistent with other SDKs.

Contributing

Please check the CONTRIBUTING.md doc for contribution guidelines.

Development

Install dependencies:

composer install

Run examples at http://localhost:62000/ with php built-in server:

composer serve

And test your code:

composer test

License

This software is licensed under MIT.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固