{"id":36254487,"url":"https://github.com/sudiptpa/esewa","last_synced_at":"2026-01-13T22:06:10.410Z","repository":{"id":57060976,"uuid":"75586885","full_name":"sudiptpa/esewa","owner":"sudiptpa","description":"Integrate eSewa payment gateway for online payments. A php library to comsume eSewa payment gateway API, built on top of Omnipay Payment processing library.  Read the blog post to follow the step by step guide on how to integrate esewa with Laravel PHP framework.","archived":false,"fork":false,"pushed_at":"2025-03-08T10:28:05.000Z","size":70,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-11T12:41:16.020Z","etag":null,"topics":["composer","esewa","esewa-api","esewa-driver","esewa-epay","esewa-gateway","esewa-nepal","esewa-pnp","gateway","omnipay","payment","payment-gateway","payments","php"],"latest_commit_sha":null,"homepage":"https://sujipthapa.com/blog/esewa-payment-gateway-integration-with-laravel","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sudiptpa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-05T03:55:54.000Z","updated_at":"2025-06-18T15:28:42.000Z","dependencies_parsed_at":"2024-06-19T02:48:02.060Z","dependency_job_id":"05d59cc0-fd16-48f3-acea-262d61443478","html_url":"https://github.com/sudiptpa/esewa","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sudiptpa/esewa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudiptpa%2Fesewa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudiptpa%2Fesewa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudiptpa%2Fesewa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudiptpa%2Fesewa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sudiptpa","download_url":"https://codeload.github.com/sudiptpa/esewa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudiptpa%2Fesewa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","esewa","esewa-api","esewa-driver","esewa-epay","esewa-gateway","esewa-nepal","esewa-pnp","gateway","omnipay","payment","payment-gateway","payments","php"],"created_at":"2026-01-11T07:05:02.763Z","updated_at":"2026-01-13T22:06:10.405Z","avatar_url":"https://github.com/sudiptpa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Omnipay: eSewa\n\n**eSewa driver for the Omnipay PHP payment processing library**\n\n[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment\nprocessing library for PHP. This package implements eSewa support for Omnipay.\n\n[![StyleCI](https://github.styleci.io/repos/75586885/shield?branch=master\u0026format=plastic)](https://github.styleci.io/repos/75586885)\n[![Latest Stable Version](https://poser.pugx.org/sudiptpa/omnipay-esewa/v/stable)](https://packagist.org/packages/sudiptpa/omnipay-esewa)\n[![Total Downloads](https://poser.pugx.org/sudiptpa/omnipay-esewa/downloads)](https://packagist.org/packages/sudiptpa/omnipay-esewa)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/sudiptpa/esewa/master/LICENSE)\n\n## Installation\n\nOmnipay is installed via [Composer](http://getcomposer.org/). To install, simply require `league/omnipay` and `sudiptpa/omnipay-esewa` with Composer:\n\n```\ncomposer require league/omnipay sudiptpa/omnipay-esewa\n```\n\n**Looking for ePay v1? Check [this documentation](./docs/README-v1.md) for installation instructions.**\n\n## Basic Usage\n\n### Purchase\n\n```php\n    use Omnipay\\Omnipay;\n    use Exception;\n\n    $gateway = Omnipay::create('Esewa_Secure');\n\n    $gateway-\u003esetMerchantCode('epay_payment');\n    $gateway-\u003esetSecretKey('secret_key_provided_by_esewa');\n    $gateway-\u003esetTestMode(true);\n\n    try {\n        $response = $gateway-\u003epurchase([\n            'amount' =\u003e 100,\n            'deliveryCharge' =\u003e 0,\n            'serviceCharge' =\u003e 0,\n            'taxAmount' =\u003e 0,\n            'totalAmount' =\u003e 100,\n            'productCode' =\u003e 'ABAC2098',\n            'returnUrl' =\u003e 'https://merchant.com/payment/1/complete',\n            'failedUrl' =\u003e 'https://merchant.com/payment/1/failed',\n        ])-\u003esend();\n\n        if ($response-\u003eisRedirect()) {\n            $response-\u003eredirect();\n        }\n    } catch (Exception $e) {\n        return $e-\u003egetMessage();\n    }\n```\n\nAfter successful payment and redirect back to merchant site, you need to verify the payment response.\n\n### Verify Payment\n\n```php\n    $gateway = Omnipay::create('Esewa_Secure');\n\n    $gateway-\u003esetMerchantCode('epay_payment');\n    $gateway-\u003esetSecretKey('secret_key_provided_by_esewa');\n    $gateway-\u003esetTestMode(true);\n\n    $payload = json_decode(base64_decode($_GET['data']), true);\n\n    $signature = $gateway-\u003egenerateSignature(generateSignature($payload));\n    if ($signature === $payload['signature']) {\n        // Verified\n    } else {\n        // Unverified\n    }\n```\n\nYou can also check the status of payment if no any response is received when redirected back to merchant's site.\n\n### Check Status\n\n```php\n    $gateway = Omnipay::create('Esewa_Secure');\n\n    $gateway-\u003esetMerchantCode('epay_payment');\n    $gateway-\u003esetSecretKey('secret_key_provided_by_esewa');\n    $gateway-\u003esetTestMode(true);\n\n    $payload = [\n        'totalAmount' =\u003e 100,\n        'productCode' =\u003e 'ABAC2098',\n    ];\n\n    $response = $gateway-\u003echeckStatus($payload)-\u003esend();\n    if ($response-\u003eisSuccessful()) {\n        // Success\n    }\n```\n\n## Working Example\n\nWant to see working examples before integrating them into your project? View the examples **[here](https://github.com/pralhadstha/payment-gateways-examples)**\n\n## Laravel Integration\n\nPlease follow the [eSewa Online Payment Gateway Integration](https://sujipthapa.com/blog/esewa-payment-gateway-integration-with-laravel) and follow step by step guidlines.\n\n## Official Doc\n\nPlease follow the [Official Doc](https://developer.esewa.com.np) to understand about the parameters and their descriptions.\n\n## Contributing\n\nContributions are **welcome** and will be fully **credited**.\n\nContributions can be made via a Pull Request on [Github](https://github.com/sudiptpa/esewa).\n\n## Support\n\nIf you are having general issues with Omnipay Esewa, drop an email to sudiptpa@gmail.com for quick support.\n\nIf you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/sudiptpa/esewa/issues),\nor better yet, fork the library and submit a pull request.\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudiptpa%2Fesewa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsudiptpa%2Fesewa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudiptpa%2Fesewa/lists"}