Download the PHP package yoonpay/yoon-php without Composer
On this page you can find all versions of the php package yoonpay/yoon-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yoonpay/yoon-php
More information about yoonpay/yoon-php
Files in yoonpay/yoon-php
Package yoon-php
Short Description PHP client for Yoon, the self-hosted payment gateway for African payment providers, with Laravel and Symfony integrations.
License Apache-2.0
Homepage https://github.com/crossben/yoonpay
Informations about the package yoon-php
yoonpay/yoon-php
PHP client for Yoon, a self-hosted payment gateway for African payment providers, with Laravel and Symfony integrations. Apache-2.0.
Requires PHP 8.2+. Works with Guzzle 7 and 8 (Laravel 10 to 13) and with Symfony 6.4 LTS and 7.x.
Plain PHP
Helpers: createPayment, getPayment, refund, createPayout, exportCsv. Every other
operation of the API is on the generated API objects — $yoon->payments(), ->refunds(),
->payouts(), ->events(), ->ledger(), ->meta() — wrapped with $yoon->call(fn () => …)
to turn errors into YoonException.
Laravel
The service provider and the Yoon facade are auto-discovered.
Receiving Yoon's events
The yoon.webhook middleware rejects bad signatures and stale timestamps (401), answers
already-handled events with 200 without calling your controller, and remembers an event only
after your controller answered 2xx. Events are unordered: act on the state in object().
Outside Laravel: Yoon\Webhook\Signature::verify($secret, $header, $rawBody) and
Yoon\Webhook\Event::fromJson($rawBody).
Symfony
The bundle ships in this package (Yoon\Symfony); Symfony components are not a dependency of
it, so Laravel applications never pull them. Register the bundle:
Yoon\Yoon is autowirable:
Receiving Yoon's events
Put #[YoonWebhook] on the controller (method or class) and type an argument Yoon\Webhook\Event:
Like the Laravel middleware, the bundle checks the signature over the raw body (401 if wrong or
older than 300 s), answers already-handled events with 200 without calling your controller, and
remembers an event id in the cache pool only after your controller answered 2xx: a controller
that fails or throws gets the retry. Keep the route outside any firewall that requires a login
or CSRF token. With more than one server, point webhook.cache at a shared pool (Redis, …).
Layout
generated/— generated fromapi/openapi.yamlbyclients/generate.sh. Never edit by hand; CI fails if it drifts from the contract.src/— the hand-written layer:Yoon,YoonException, webhook helpers, Laravel integration (src/Laravel), Symfony bundle (src/Symfony).
All versions of yoon-php with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.8 || ^8.0
guzzlehttp/psr7 Version ^2.6 || ^3.0