PHPackages                             quellabs/canvas-payments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. quellabs/canvas-payments

ActiveLibrary[Payment Processing](/categories/payments)

quellabs/canvas-payments
========================

Payment router for the Canvas PHP framework. Discovers and routes payment operations to installed provider packages.

1.0.5(1mo ago)02MITPHPPHP ^8.2

Since Mar 17Pushed 1mo agoCompare

[ Source](https://github.com/quellabs/canvas-payments)[ Packagist](https://packagist.org/packages/quellabs/canvas-payments)[ RSS](/packages/quellabs-canvas-payments/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (6)Versions (7)Used By (0)

Canvas Payments
===============

[](#canvas-payments)

Payment router for the Canvas framework. Discovers installed payment provider packages automatically via composer metadata and routes payment operations to the correct provider.

Installation
------------

[](#installation)

```
composer require quellabs/canvas-payments
```

How it works
------------

[](#how-it-works)

`PaymentRouter` scans installed packages for composer metadata declaring a `provider` class under the `payments` discovery key. Any package that declares one and implements `PaymentProviderInterface` is registered automatically — no manual configuration required.

The provider class must implement a static `getMetadata()` method returning a `modules` array. Each entry becomes a routable module identifier.

```
"extra": {
    "discover": {
        "canvas": {
            "controller": "Quellabs\\Payments\\Mollie\\MollieController"
        },
        "payments": {
            "provider": "Quellabs\\Payments\\Mollie\\Driver",
            "config": "config/mollie.php"
        }
    }
}
```

At runtime, `PaymentRouter` uses the `paymentModule` field on the request to route calls to the correct provider.

Configuration
-------------

[](#configuration)

After `composer install`, the package publishes a default config file to `config/mollie.php` via a `post-autoload-dump` script. Edit this file to set your API key, webhook URL, redirect URL, and cancel URL.

Usage
-----

[](#usage)

Inject `PaymentRouter` via Canvas DI:

```
use Quellabs\Payments\PaymentRouter;
use Quellabs\Payments\Contracts\PaymentRequest;
use Quellabs\Payments\Contracts\RefundRequest;

class CheckoutService {
    public function __construct(private PaymentRouter $router) {}

    public function pay(): string {
        $response = $this->router->initiate(new PaymentRequest(
            paymentModule: 'mollie_ideal',
            amount:        999,   // in minor units — €9.99
            currency:      'EUR',
            description:   'Order #12345',
        ));

        if (!$response->success) {
            throw new \RuntimeException($response->errorMessage);
        }

        return $response->redirectUrl;
    }
}
```

Available methods
-----------------

[](#available-methods)

MethodDescription`initiate(PaymentRequest)`Start a payment session, returns redirect URL and transaction ID`refund(RefundRequest)`Issue a refund for a completed payment`exchange(string $transactionId)`Fetch current payment state (call from webhook handler)`getRefunds(string $transactionId)`Returns all refunds for a given transaction`getPaymentOptions(string $module)`Fetch available issuers or options for a payment module`getRegisteredModules()`Returns all discovered module identifiersRequirements
------------

[](#requirements)

- PHP 8.2+
- Quellabs Canvas framework

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance94

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

6

Last Release

32d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/57e4ab872b3e37536367f2d26b192df3d3bb6a6a1cebec9a104d14a6d2ffe157?d=identicon)[noescom](/maintainers/noescom)

---

Tags

routerdiscoverypaymentscanvascanvas-payments

### Embed Badge

![Health badge](/badges/quellabs-canvas-payments/health.svg)

```
[![Health](https://phpackages.com/badges/quellabs-canvas-payments/health.svg)](https://phpackages.com/packages/quellabs-canvas-payments)
```

###  Alternatives

[recurly/recurly-client

The PHP client library for the Recurly API

1736.5M8](/packages/recurly-recurly-client)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.3M9](/packages/chargebee-chargebee-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
