How izzudin96/billplz-laravel works
This is a Laravel integration package that wraps Billplz bill creation and status retrieval, and handles redirect and webhook payloads through strict verification or best-effort parsing. The main workflow is an application resolving the client, making bill API calls, and receiving typed bill DTOs; callbacks and webhooks are parsed separately into typed payload DTOs. Laravel configuration and the facade support client setup and access, while an Eloquent cast converts bill values to and from DTOs. Client internals and some wiring are only partially sampled, so uncertain implementation links are omitted.
Main entry points: BillplzClient.php Billplz client · BillResponse.php Bill response · BillplzServiceProvider.php Service provider · WebhookPayload.php Webhook payload
Components 15
Laravel integration
- Service provider
src/BillplzServiceProvider.php - Client configuration
config/billplz.php - Billplz facade
src/Facades/Billplz.php
Billplz client
- Billplz client
src/BillplzClient.php - Laravel HTTP client
- Signature checks
src/BillplzClient.php - Signature exception
src/Exceptions/FailedSignatureVerification.php
Typed payloads
- Bill response
src/DTOs/BillResponse.php - Redirect payload
src/DTOs/RedirectPayload.php - Webhook payload
src/DTOs/WebhookPayload.php
Data mapping
- Value normalizers
src/Concerns - Bill Eloquent cast
src/Casts/BillplzBill.php
Other components
- Laravel application
- Billplz API
- Eloquent model
Connections 20
- Laravel application → Service provider: resolves client
- Service provider → Client configuration: merges settings
- Service provider → Billplz client: registers singleton
- Laravel application → Billplz facade: calls methods
- Billplz facade → Billplz client: resolves accessor
- Laravel application → Billplz client: calls methods
- Billplz client → Laravel HTTP client: configures requests
- Billplz client → Billplz API: creates or fetches bills
- Billplz API → Laravel HTTP client: returns responses
- Billplz client → Bill response: maps bill data
- Billplz client → Signature checks: checks signatures
- Billplz client → Redirect payload: parses redirect
- Billplz client → Webhook payload: parses webhook
- Billplz client → Signature exception: throws on failure
- Bill response → Value normalizers: normalizes values
- Redirect payload → Value normalizers: normalizes values
- Webhook payload → Value normalizers: normalizes values
- Webhook payload → Bill response: converts payload
- Eloquent model → Bill Eloquent cast: casts attributes
- Bill Eloquent cast → Bill response: maps stored values