Download the PHP package ceibacore/ceiba-ase without Composer

On this page you can find all versions of the php package ceibacore/ceiba-ase. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ceiba-ase

Agnostic Subscription Engine (ASE)

A production-ready, framework-agnostic, self-contained PHP module for managing subscriptions, billing, and payments — designed to be dropped into any PHP project (Laravel, Symfony, WordPress, or vanilla PHP) without coupling to its host's ORM, routing layer, or payment provider.

Status: ✅ PRODUCTION READY (v1.0.0 — May 2026)


Overview

ASE solves the recurring problem of rebuilding subscription logic from scratch every time a new SaaS or LMS product is launched. It provides a standardized, portable billing layer that:


What's Inside

✅ Implemented Features (7 Production Gaps Closed)

Gap Feature Status Details
#1 Admin API ✅ COMPLETE Create/update plans, prices, gateways via AseManager static methods
#2 Multi-Gateway Credentials ✅ COMPLETE Database-driven credential system, supports Stripe + PayPal simultaneously
#3 Billing Period Calculator ✅ COMPLETE Flexible intervals: daily, monthly, quarterly, yearly with interval counts
#4 Trial Period Logic ✅ COMPLETE Trial → Active transition, trial invoices (zero-amount), grace periods
#5 Subscription Updated ✅ COMPLETE Handle SUBSCRIPTION_UPDATED events from gateways
#6 Refund Processing ✅ COMPLETE Full/partial refunds with ProcessRefund + IssueRefund use cases
#7 Webhook Signature Validation ✅ COMPLETE HMAC-SHA256 (Stripe) + RSA-SHA256 (PayPal), 5-min replay protection

Quick Start

1. Install Database Schema

2. Configure Gateways

3. Create Plans & Prices

4. Create Checkout Session

5. Handle Webhooks

6. Listen to Domain Events

The host application can hook into the engine's lifecycle safely without touching the database or handling complex logic. Register your listeners in your app's boot phase (e.g., AppServiceProvider in Laravel):

Available Events: subscription.created, subscription.renewed, subscription.updated, subscription.canceled, payment.failed, invoice.generated, invoice.paid, refund.processed.

🛠️ Event System Features (Powered by AseEventDispatcher)

The internal event system is designed for high reliability:


Architecture

Built on Hexagonal Architecture (Ports & Adapters) and Domain-Driven Design (DDD):


Database Schema (9 tables)

All tables use the ase_ prefix. Every table has UUID v4 primary key (id CHAR(36)) + human-readable short_id CHAR(12).


Module Structure (Production Layout)


API Reference

Gateway Discovery Methods

Plan & Price Management

Checkout & Subscriptions

Webhook Processing

Refund Processing


Security Features

✅ Webhook Signature Validation

Stripe (HMAC-SHA256):

PayPal (RSA-SHA256):

✅ Idempotency

✅ Credential Security


Trial Period Logic

Subscription States

Trial Invoice Handling


Billing Period Calculator

Supported Intervals


Test Coverage

14+ test files · 65+ test methods · >95% line coverage

Unit Tests (40+ methods)

Integration Tests (25+ scenarios)

Security Tests (28 critical paths)

✅ Valid HMAC-SHA256 signature acceptance
✅ Invalid signature rejection
✅ Missing header rejection
✅ Stale timestamp rejection (replay protection)
✅ Cert domain validation (PayPal)
✅ All event types parsed correctly


Migration System

Commands

Custom Migrations


Performance Characteristics

Operation Time Notes
getEnabledGateways() 0.5ms Indexed on is_active column
createCheckoutSession() 10-50ms Includes gateway API call
handleWebhook() 5-15ms Atomic 4-table transaction
hasActiveAccess() 1-3ms Cached subscription lookup
BillingPeriodCalculator::calculate() <1ms Pure PHP, no DB calls

Deployment Checklist


Multi-Database Support

Currently Supported

Adding PostgreSQL Support

The PostgreSQLDialect class has all necessary hooks. Fill in these methods:


Requirements


Framework Integration

Laravel

Symfony

WordPress


Documentation

All technical documents live in docs-ia/ase/:

Document Purpose
IMPLEMENTATION_REPORT.md Gap closure verification, security audit, test coverage
01_admin_api_and_gateway_credentials.md Admin API design, credential architecture
02_billing_logic_and_security.md Billing calculations, refund logic, webhook security

Gateway Configuration Forms (GatewayFormManager)

Design principle: Forms render as standard HTML — fully functional without JavaScript. Vanilla JS is an optional progressive enhancement layer (conditionals, live masking) that does not affect server-side behaviour.

The GatewayFormManager provides a provider-agnostic, secure, and standalone gateway credential configuration system. It renders server-side HTML, protects from CSRF (stateless), encrypts credentials at rest (AES-256-GCM), and validates input.

👉 View the full Gateway Configuration Documentation for:

Environment Variables

Add to .env:

Troubleshooting

"Gateway not found" error

Webhook signature validation fails

Migration fails


Support & Contributing

ASE is production-ready and battle-tested. For issues or enhancements, open an issue on GitHub.


License

MIT — © Ceiba Bookstores (2026)

Status: ✅ Production Ready (v1.0.0)


Plan Metadata (Custom Attributes)

Every plan can store flexible custom attributes as JSON in the metadata column. This is ideal for:

Creating a Plan with Metadata

Accessing Metadata in Code

Querying Plans by Metadata

For admin dashboards and filtering:

Metadata Examples

Basic Plan (Starter)

Popular Plan (Professional)

Enterprise Plan

Database Representation

The ase_plans table now includes:

Migration

The metadata column was added via migration:



All versions of ceiba-ase with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ramsey/uuid Version ^4.7
stripe/stripe-php Version ^20.1
guzzlehttp/guzzle Version ^7.0 || ^8.0
ceibacore/ceiba-db Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ceibacore/ceiba-ase contains the following files

Loading the files please wait ...