Download the PHP package djlemmor/djpaykit-laravel without Composer
On this page you can find all versions of the php package djlemmor/djpaykit-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download djlemmor/djpaykit-laravel
More information about djlemmor/djpaykit-laravel
Files in djlemmor/djpaykit-laravel
Package djpaykit-laravel
Short Description Laravel backend adapter for the DJPayKit QR payment widget.
License MIT
Homepage https://github.com/djlemmor/dj-paykit-laravel
Informations about the package djpaykit-laravel
DJPayKit Laravel
Laravel 12 backend adapter for the DJPayKit QR payment widget.
It allows a website owner to configure payment methods such as GCash, Maya, and MariBank, upload private QR images, and expose controlled public endpoints for the DJPayKit widget.
Requirements
- PHP 8.2 or newer
- Laravel 12
- A Laravel filesystem disk
- Authentication middleware for administrator endpoints
Features
- GCash, Maya, and MariBank support
- Extensible provider configuration
- Private QR image storage
- Public payment-method API
- Controlled QR image responses
- Administrator CRUD endpoints
- Account-number privacy controls
- ULID payment-method identifiers
- Soft deletion
- Validated PNG, JPEG, and WebP uploads
- Safe QR replacement and cleanup
- Automated package tests
Installation
The package has not yet been published to Packagist. The standard installation command will become available after the first release:
Then run:
Local development installation
Add DJPayKit as a Composer path repository:
Run the installer:
Composer normally symlinks the package, so local DJPayKit changes become available without reinstalling it.
Configuration
The installation command publishes:
Important settings:
| Setting | Default | Purpose |
|---|---|---|
route_prefix |
api/djpaykit |
Prefix for all package routes |
api_middleware |
['api'] |
Middleware for public widget routes |
admin_middleware |
['api', 'auth'] |
Middleware for administrator routes |
storage_disk |
local |
Private QR and receipt storage |
maximum_image_size_kb |
5120 |
Maximum upload size in kilobytes |
maximum_image_width |
4096 |
Maximum QR width |
maximum_image_height |
4096 |
Maximum QR height |
default_currency |
PHP |
Default payment currency |
show_account_number_by_default |
false |
Default public account-number visibility |
proof_of_payment_enabled |
false |
Enables future receipt submissions |
Environment variables:
Administrator authentication
Administrator endpoints use the middleware configured in:
Applications using Sanctum can change it to:
DJPayKit does not create administrator users or decide which users are authorized. The host Laravel application remains responsible for authentication and authorization.
Storage security
QR images use Laravel's configured private disk:
Laravel 12's local disk normally stores private files below:
DJPayKit serves QR images through a controlled route. It never returns the underlying filesystem or cloud-storage path.
Do not move DJPayKit QR images to the public disk unless your application intentionally wants to bypass these controls.
Supported providers
The default providers are:
A host application can add another provider:
Provider IDs may contain lowercase letters, numbers, hyphens, and underscores.
Public API
List enabled payment methods
Example response:
accountNumber is null unless the owner enables
show_account_number for that payment method.
Disabled and soft-deleted methods are excluded.
Display a QR image
The endpoint:
- Only serves enabled payment methods
- Reads from the configured private disk
- Allows PNG, JPEG, and WebP
- Sends
X-Content-Type-Options: nosniff - Does not expose the private storage path
- Returns
404for disabled, deleted, missing, or unsupported images
Administrator API
All administrator routes require the configured administrator middleware.
List payment methods
The administrator list includes enabled and disabled methods but excludes soft-deleted records and private QR paths.
Create a payment method
Example using cURL:
Required fields:
providerdisplay_nameaccount_nameqr_image
Optional fields:
account_numberinstructionsshow_account_numberis_enabledsort_order
QR requirements:
- PNG, JPEG, or WebP
- Maximum 5 MB by default
- Maximum 4096×4096 pixels by default
- SVG is not accepted
Update a payment method
All update fields are optional. The provider cannot be changed after creation.
Example replacing a QR:
If the database update fails, DJPayKit deletes the new upload and keeps the original QR.
Delete a payment method
Deletion:
- Soft-deletes the database record
- Removes the associated QR image
- Prevents the public API from returning the method
- Returns HTTP
204 No Content
Error responses
Common status codes:
| Status | Meaning |
|---|---|
200 |
Successful list or update |
201 |
Payment method created |
204 |
Payment method deleted |
404 |
Payment method or QR not found |
422 |
Validation failed |
500 |
Unexpected storage or database failure |
Laravel returns validation errors in its normal JSON format:
Routes
List all package routes:
DJPayKit registers:
Frontend widget integration
Install the core widget after it is published:
For local development:
Register the custom element in the application's JavaScript entry:
Example Laravel Blade integration:
The first enabled method is selected automatically. Selecting another provider updates its account details and QR without reloading the page.
Widget events
The host checkout can observe provider selection:
The host checkout can also observe successful QR downloads:
For the simplest integration, serve the Laravel API and widget from the same origin. Cross-origin integrations require the host application's CORS configuration to allow the checkout website.
Package development
Install dependencies:
Run tests:
Run a specific test:
On Windows, if Git Bash cannot run the Unix vendor launcher, use:
Current verified result:
License
DJPayKit Laravel is open-source software licensed under the MIT License.
All versions of djpaykit-laravel with dependencies
illuminate/console Version ^12.0
illuminate/database Version ^12.0
illuminate/filesystem Version ^12.0
illuminate/http Version ^12.0
illuminate/routing Version ^12.0
illuminate/support Version ^12.0
illuminate/validation Version ^12.0