satnam-singh/sbi-epay
A Laravel/PHP package for integrating the SBI ePay payment gateway. Configure merchant credentials, build and redirect payment requests to SBI ePay, and handle success, failure, and callback responses in your application. Simplifies accepting online payments via State Bank of India ePay.
satnamgills/sbi-epay-laravel wraps SBI ePay (State Bank of India payment gateway) for Laravel: payment initiation, redirect to the SBI hosted page, and server-side verification of the result.
Minimal path:
composer require satnamgills/sbi-epay-laravel — pin to ^1.0.10 (see Gotchas; earlier tags shipped stale endpoints).php artisan vendor:publish --tag=... — check the README for the exact tag) and set merchant credentials plus the mode (test / live).506e0a6), so the README is now the source of truth rather than any blog post or older snippet you may have copied.Where to look first: the config file (mode + credentials), the service provider bindings (what's resolvable from the container), and the README's payment/verification examples.
Mode is config, not code. The v1.0.10 fix is precisely about test vs live endpoints, so the package is designed to switch environment via configuration. Never branch on app()->environment() to pick URLs yourself — set the package mode and let it resolve the endpoint. Carry separate credential sets for test and live and select them with the same switch.
Two-step payment flow. Treat initiation and verification as distinct concerns:
Idempotent order references. Generate the merchant reference once and store it. Callbacks can arrive more than once (browser redirect + server-to-server), so verification handling should be safe to run repeatedly — look up the transaction by reference and no-op if already settled.
Callback route hygiene. Register the callback outside auth middleware and exclude it from CSRF (VerifyCsrfToken::$except or the Laravel 11+ equivalent). Return a plain 200 quickly; do the verification and any slow work (emails, ledger writes) in a queued job where possible.
Testing. Fake the HTTP layer and assert the outgoing payload (amount, reference, mode-specific endpoint). For the callback, construct a representative gateway response fixture rather than hitting the sandbox in CI — the test endpoint's availability is outside your control.
Multi-merchant / multi-tenant. If you serve several merchants, resolve config per request rather than binding once at boot; check whether the package reads config at resolution time or at construction time before relying on runtime overrides.
Promotion path. Keep one code path and flip mode + credentials per environment. Smoke-test in test mode with the corrected endpoints from this release before switching live.
>=1.0.10. The headline fix (eb2a641) corrects payment and verification endpoints for both test and live modes. If you integrated against 1.0.9 or earlier, you may have "fixed" it locally by hardcoding URLs or overriding config — remove those workarounds after upgrading, or they will silently shadow the corrected values.php artisan config:clear (and config:cache in deploy). Stale cached config is the usual cause of "it works locally, not on the server."How can I help you explore Laravel packages today?