8ctopus/paddle-rest-api 问题修复 & 功能扩展

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

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

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固