Download the PHP package quellabs/canvas-payments without Composer
On this page you can find all versions of the php package quellabs/canvas-payments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package 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
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.
At runtime, PaymentRouter uses the paymentModule field on the request to route calls to the correct provider.
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
Inject PaymentRouter via Canvas DI:
Available methods
| Method | Description |
|---|---|
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 identifiers |
Requirements
- PHP 8.2+
- Quellabs Canvas framework
License
MIT
All versions of canvas-payments with dependencies
quellabs/discover Version *
quellabs/contracts Version *
quellabs/canvas-payments-contracts Version *