fadhila36/pakasir-sdk
Laravel SDK type-safe untuk integrasi Pakasir Payment Gateway: QRIS, Virtual Account multi-bank, dan PayPal. Dilengkapi kalkulasi fee otomatis, timeout/retry, logging, Events, Notifications, serta verifikasi webhook anti-spoofing.
Http facade or custom clients.config/app.php or a service provider.PakasirGateway) to concrete implementations for easier mocking in tests.php artisan vendor:publish --provider="Fadhila36\PakasirSdk\PakasirServiceProvider") to customize API keys, endpoints, and webhook secrets.@middleware('signed') (if using Laravel’s built-in webhook signing).PaymentSucceeded) for downstream processing.Pakasir::createQrisPayment()) in controllers or services.PaymentResponse) for type safety.php-curl or php-json (used by Symfony HTTP Client).payments table).stack) for observability.PAKASIR_DEBUG=true) to log API requests/responses.PakasirException and surface user-friendly errors.throttle middleware for API calls if needed.payment_id and status fields in the payments table for fast lookups.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Pakasir API downtime | Payments fail | Implement circuit breakers (e.g., spatie/flysystem-circuit-breaker). |
| Webhook delivery failures | Unreconciled payments | Use Laravel Queues + dead-letter queue for failed webhook jobs. |
| Invalid webhook signatures | Security risk | Enforce HMAC validation; log and alert on failures. |
| Payment timeouts | User experience degradation | SDK’s retry logic; notify users to retry or use alternative methods. |
| PHP version incompatibility | Integration breaks | Pin PHP version in composer.json or use Docker to isolate environments. |
| Pakasir API changes | SDK breaks | Subscribe to Pakasir’s API changelog; test against their sandbox regularly. |
Mockery or Vesper mock).HttpTests.Payment* events).tinker commands to inspect DTOs).How can I help you explore Laravel packages today?