fadhila36/pakasir-sdk
A modern, type-safe Laravel SDK for the Pakasir payment gateway with QRIS, multi-bank Virtual Account, and PayPal support, plus automatic fees, retries, DTOs, events, and secure webhook verification.
Architecture fit
PakasirInterface container binding — dependency-inversion friendly, which is the main thing we care about.TransactionCreated, PaymentCompleted, WebhookReceived) and PaymentLinkNotification are convenience features. Dispatching them synchronously inside a webhook handler couples our callback latency to our own listener code — we should queue listeners and not rely on the default behavior.PaymentGateway port and a PakasirAdapter that delegates to the SDK. Domain code must never import Fadhila36\Pakasir\*. Cost ~1 engineering day; buys provider-swap and version-pinning isolation.Integration feasibility
composer require, publish config, two env vars). Time to first sandbox transaction is hours via simulationPayment().int|float, and fee estimates (QRIS 0.7–1%, VA Rp2,000–3,500, PayPal 1% min 3k) are hardcoded in the PaymentMethod enum. Float money plus a static vendor-side fee table is a correctness risk for displayed totals and margin math. Pass integers only, and own the fee/limit table in our own config or DB against the signed rate card.verifyWebhook() is a compensating control, not authentication. Pakasir does not sign webhooks, so the SDK makes a back-channel detailPayment call and compares the amount we supply. That is better than naive trust, but it turns an unauthenticated inbound endpoint into an outbound-call amplifier (cost, rate-limit, DoS surface) and makes callback correctness depend on provider API availability.Technical risk (ranked)
zeative org while the composer namespace is Fadhila36 (rebrand churn), and the v1.0.1 release notes compare v2.0.0...v1.0.1 — a release-tooling anomaly that undermines confidence in the published changelog. Individually survivable; collectively a "do not take an unabstracted hard dependency" signal.createPayment retries (default 3, exponential delay) on what appears to be a non-idempotent POST. Duplicate or orphaned transactions are plausible under provider degradation.PAKASIR_LOGGING_ENABLED writes request/response payloads to Laravel logs; needs redaction, channel isolation, and retention limits.strict_types, Pest 4 / PHPUnit 12).Key questions
createPayment dedupe on orderId? What is returned on duplicate — the same transaction or an error? What is the ID reuse TTL?Stack fit
PakasirInterface) rather than the facade inside our adapter, so tests can bind a fake cleanly.Migration path
Compatibility
"fadhila36/pakasir-sdk": "2.0.*" with a committed composer.lock; treat minors as potentially breaking.Sequencing
createPayment for QRIS plus one VA, simulationPayment, and verifyWebhook against happy path, replayed payload, tampered amount, and wrong project slug. Exit criteria must include duplicate-orderId behavior and forced-timeout behavior.orderId + terminal-state guard).detailPayment over non-terminal orders) in the same release. This is day-one scope, not a follow-up.Maintenance
Support
Scaling
Failure modes and required mitigations
PAKASIR_LOGGING_ENABLED in production by default or route to a restricted channel with short retention.Ramp-up
docs/INTEGRATION.md; the verification model (why the double-check exists, what to do when it fails) needs an internal ADR — that is the piece most likely to be implemented wrong.Recommendation Viable as a secondary IDR rail — QRIS and VA — behind a thin internal adapter, with reconciliation and webhook hardening in the first release and a documented fallback provider. Not viable as a sole, unabstracted dependency: single maintainer, zero dependents, unsigned webhooks, hardcoded fee tables, and a breaking-major cadence. Reassess toward primary-rail status only after we have a quarter of production data and confirmation on idempotency, refunds, and provider SLA.
How can I help you explore Laravel packages today?