Download the PHP package bazzly/payoffice without Composer
On this page you can find all versions of the php package bazzly/payoffice. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bazzly/payoffice
More information about bazzly/payoffice
Files in bazzly/payoffice
Package payoffice
Short Description Laravel package to use all fintech payment API and fetch server for pings
License MIT
Homepage https://github.com/Bazzly/payoffice
Informations about the package payoffice
Payoffice
All your payment providers in one place.
Payoffice is a Laravel package that solves one specific problem: a payment provider's API can go down or slow down, and your checkout shouldn't blindly trust it. Before sending a customer to a payment gateway, Payoffice can ping the provider's API host and report whether it's up, down, and how fast it's responding — so your app can pick a healthy provider or warn the user instead of failing mid-checkout.
On top of that, it bundles ready-to-use integrations for popular fintech APIs so you don't have to wire each one up from scratch.
Table of contents
- Features
- Requirements
- Installation
- Configuration
- Usage
- Server / API health ping
- Persisting ping results
- Paystack — payments
- Paystack — transfers & banks
- Transaction reference generator
- Testing
- Local simulation
- Roadmap / known limitations
- Credits
- License
Features
- Provider health check — ping a payment API's host over TCP and get back status
(
up/down) and latency in milliseconds before deciding whether to use it. - Paystack payments — initialize transactions, verify payments, manage plans, customers, subscriptions, payment pages, and subaccounts.
- Paystack transfers — look up banks, resolve account numbers, create transfer recipients, and send money.
- Secure transaction references — cryptographically random reference/token generator.
- Config-driven, multi-provider — Paystack, Flutterwave, Interswitch, and Remita are pre-scaffolded in the published config file.
Requirements
| Requirement | Version |
|---|---|
| PHP | ^7.2 | ^8.0 | ^8.1 | ^8.2 | ^8.3 | ^8.4 |
Laravel (illuminate/support) |
^6 | ^7 | ^8 | ^9 | ^10 | ^11 | ^12 | ^13 |
guzzlehttp/guzzle |
^6 | ^7 | ^8 | ^9 |
Local development (running the test suite / examples/demo.php) is verified against the
latest supported combination — PHP 8.4, Laravel 13, PHPUnit 13, orchestra/testbench 11 —
via require-dev, regardless of which older Laravel/PHP version you build against.
Installation
Install via Composer:
Laravel's package auto-discovery will register Bazzly\Payoffice\PaymentServiceProvider
automatically — no manual entry in config/app.php is needed.
Publish the config file and the pings_monitoring migration:
Publishing the config is required — the package reads provider settings from
config/payoffice.phponce it exists in your app, not from the package's internal copy.
Configuration
The published config/payoffice.php is a list of provider entries. Fill in credentials via
your .env file:
Each provider entry in config/payoffice.php has a name and APIURL key used by the
health-ping feature, plus a provider-specific block (paystack, flutterwave, etc.) used
by that provider's integration classes.
Usage
Server / API health ping
PingServer checks whether a payment API host is reachable and how fast it responds, so you
can gate checkout on the provider actually being up.
To check every provider configured in config/payoffice.php in one pass:
Persisting ping results
If you want a history of ping checks (e.g. for an internal status dashboard), the
pings_monitoring migration and PingsMonitoring Eloquent model are included:
This is a manual step — the package does not currently schedule ping checks for you. Wire it into your own
app/Console/Kernel.phpschedule if you want periodic checks.
Paystack — payments
GetPaid wraps the Paystack transactions/plans/customers/subscriptions/pages/subaccounts
API. Most methods read their payload straight from the current request (i.e. they're meant
to be called from a controller handling a form POST), but you can also pass an explicit
$data array to bypass that.
Other available methods:
| Method | Purpose |
|---|---|
genTranxRef() |
Generate a unique transaction reference |
getAllCustomers() / createCustomer() / fetchCustomer($id) / updateCustomer($id) |
Customer management |
getAllPlans() / createPlan() / fetchPlan($code) / updatePlan($code) |
Subscription plan management |
createSubscription() / getAllSubscriptions() / getCustomerSubscriptions($id) / getPlanSubscriptions($id) / enableSubscription() / disableSubscription() / fetchSubscription($id) |
Subscription management |
createPage() / getAllPages() / fetchPage($id) / updatePage($id) |
Paystack payment pages |
createSubAccount() / fetchSubAccount($code) / listSubAccounts($perPage, $page) / updateSubAccount($code) |
Split-payment subaccounts |
exportTransactions() / getAllTransactions() |
Transaction reporting |
Paystack — transfers & banks
Transfer handles paying money out — bank lookups, recipient creation, and transfers.
Transaction reference generator
TransRef generates cryptographically-random reference strings/tokens (useful for anything
needing a unique, non-guessable identifier — not limited to Paystack).
Testing
PingServer, GetPaid, and Transfer all have automated coverage. The Paystack tests
don't hit the real API — they inject a Guzzle MockHandler
via an optional constructor argument (new GetPaid($handlerStack) /
new Transfer($handlerStack)), so the suite runs offline with no credentials needed:
Omit the argument in real usage (new GetPaid()) and it talks to the real Paystack API
as normal.
Tests use PHPUnit's #[Test] attribute (PHPUnit\Framework\Attributes\Test), not the
older /** @test */ docblock — the latter was removed in PHPUnit 11+. Match that
convention for any new test you add.
Local simulation
examples/demo.php is a runnable, no-credentials-needed walkthrough of the whole
package — a real network health check via PingServer, plus a mocked Paystack
payment and payout flow via GetPaid/Transfer (same MockHandler approach as the
tests). Useful for seeing the package work end-to-end without setting up a Laravel app
or real API keys:
Roadmap / known limitations
This package is under active development. Known rough edges before you rely on it in production:
- Scheduled/periodic pinging and automatic persistence to
PingsMonitoringare not wired up yet; you must trigger and store checks yourself. - The Paystack integration is a fork of
unicodeveloper/laravel-paystackadapted to this package's config structure — behavior should match the upstream package, but hasn't yet been independently re-verified end-to-end here.
Credits
- ALLI BAZEET — author
- unicodeveloper — the Paystack
integration in
src/Paystackis adapted fromlaravel-paystack; enormous credit for the original, well-documented implementation this was built on.
License
The MIT License (MIT). See LICENSE for details.
All versions of payoffice with dependencies
php Version ^7.2|^8.0|^8.1|^8.2|^8.3|^8.4
illuminate/support Version ~6|~7|~8|~9|^10.0|^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ~6|~7|~8|~9