vatly/vatly-fluent-php 问题修复 & 功能扩展

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

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

vatly/vatly-fluent-php

最新稳定版本:v0.4.0-alpha.1

Composer 安装命令:

composer require vatly/vatly-fluent-php

包简介

Framework-agnostic fluent PHP SDK for Vatly billing

README 文档

README

Latest Version on Packagist Tests Total Downloads

Alpha release -- under active development. Expect breaking changes.

Framework-agnostic fluent PHP SDK for Vatly billing. Wraps the vatly-api-php client with expressive, action-based methods for managing subscriptions, checkouts, customers, and webhooks.

This package serves as the core logic layer, designed to be portable across PHP frameworks and as a reference for future language ports (JS, Python).

Installation

composer require vatly/vatly-fluent-php

This package follows semantic versioning. During alpha, pin to exact versions if you need stability:

composer require vatly/vatly-fluent-php:v0.3.0-alpha.2

Requirements

What's included

  • Actions: CreateCheckout, CreateCustomer, GetCheckout, GetCustomer, GetSubscription, GetPaymentMethodUpdateUrl, CancelSubscription, SwapSubscriptionPlan
  • Webhook handling: Signature verification, event factory, typed event objects
  • Contracts: BillableInterface, repository interfaces for framework integration
  • Responses: Typed response objects for all actions

Usage

use Vatly\API\VatlyApiClient;
use Vatly\Fluent\Actions\CreateCheckout;

$client = new VatlyApiClient();
$client->setApiKey('test_xxxxxxxxxxxx');

$checkout = new CreateCheckout($client);
$response = $checkout->execute([
    'products' => ['subscription_plan_id'],
    'customerId' => 'cust_xxx',
    'redirectUrlSuccess' => 'https://example.com/success',
    'redirectUrlCanceled' => 'https://example.com/canceled',
]);

For framework integrations

If you're using Laravel, see vatly/vatly-laravel which provides Eloquent models, traits, builders, and event listeners on top of this package.

Testing

composer test

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固