8ctopus/paddle-rest-api
最新稳定版本:0.7.1
Composer 安装命令:
composer require 8ctopus/paddle-rest-api
包简介
Paddle REST API implementation using PSR-7, PSR-17 and PSR-18
README 文档
README
An unoffical php implementation of the Paddle REST API using PSR-7, PSR-17 and PSR-18 as I didn't like the official API's implementation.
The package is a work in progress and contributions are welcome. For now, it covers Products, Prices, Discounts, Discount Groups, Transactions (partial), Adjustments (refunds) and Customers.
install package
composer require 8ctopus/paddle-rest-api
before you get started
Copy .env.example to .env and fill in your Paddle REST API key. If you don't have it yet, follow the guide:
https://developer.paddle.com/api-reference/about/authentication#get-api-key
demo
Here's a code snippet that shows the general architecture. To see all possibilites run php demo.php.
use Nimbly\Capsule\Factory\RequestFactory; use Nimbly\Capsule\Factory\StreamFactory; use Nimbly\Shuttle\Shuttle; use Oct8pus\Paddle\HttpHandler; use Oct8pus\Paddle\Auth; use Oct8pus\Paddle\Products; $handler = new HttpHandler( // PSR-18 http client new Shuttle(), // PSR-17 request factory new RequestFactory(), // PSR-7 stream new StreamFactory() ); $sandbox = true; $auth = new Auth($sandbox, $handler, $env['secret']); $products = new Products($sandbox, $handler, $auth); var_dump($products->list());
todo
- implement tests
issues with the current minimalist architecture
- hard to use the demo for more complex things
- create complex items as arrays are not presently supported
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-30