Languages
All six adapters implement the same providers and the same interface. Every suite runs the providers’ signature test vectors and the same mocked-provider cases, 414 tests in total, and each language has a live eSewa and Fonepay sandbox check.
| Language | Runtime | Dependencies | Tests | Source |
|---|---|---|---|---|
| TypeScript | Node 22.18+, Bun, Deno, Workers, Next.js edge | Zero dependencies | 49 | scripts/ts/src/ |
| Python | Python 3.10+ | Stdlib (cryptography for connectIPS) | 33 | scripts/python/nepal_payments/ |
| Java | JDK 17+ (Spring Boot, Quarkus) | No dependencies | 111 | scripts/java/src/main/java/np/payments/ |
| Kotlin | JDK 17+ (Ktor, Spring), suspend API | kotlin-stdlib only | 84 | scripts/kotlin/src/main/kotlin/np/payments/ |
| PHP | PHP 8.1+ (Laravel, Symfony) | ext-curl and ext-openssl, no Composer deps | 69 | scripts/php/src/ |
| Go | Go 1.22+ | Stdlib only | 68 | scripts/go/payments/ |
Run the tests
Section titled “Run the tests”From skills/nepal-payments/scripts:
(cd ts && npm ci && npm test && npm run typecheck)(cd python && python -m unittest discover -s tests) # connectIPS tests need `pip install cryptography`(cd java && ./gradlew test)(cd kotlin && ./gradlew test)(cd php && composer install && vendor/bin/phpunit)(cd go && go test -race ./...)No local PHP? Run each PHP command in Docker: docker run --rm -v "$PWD":/app -w /app composer:2 <command>.
Live sandbox checks
Section titled “Live sandbox checks”node test/sandbox.ts # TypeScript (add KHALTI_SECRET_KEY=... for Khalti)./gradlew sandbox # Java, Kotlinphp tests/sandbox.php # PHPgo run ./cmd/sandbox # GoTypeScript also has an end-to-end demo against the eSewa and Fonepay sandboxes: cd ts && node examples/server.ts, then open http://localhost:3000.
Other languages
Section titled “Other languages”For C#, Ruby, Rust or a Dart server, port from the TypeScript adapter of each provider. Write the provider’s test vectors as tests first (each provider page has them), port until they pass, then run the sandbox checks in Testing and go-live.