{"id":24200211,"url":"https://github.com/codeboxrcodehub/nagad","last_synced_at":"2025-08-25T14:12:57.950Z","repository":{"id":45722178,"uuid":"513887882","full_name":"codeboxrcodehub/nagad","owner":"codeboxrcodehub","description":"Laravel Nagad Payment Gateway Package. Easy to manage nagad payment system. ","archived":false,"fork":false,"pushed_at":"2024-05-26T05:05:46.000Z","size":35,"stargazers_count":17,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-03T15:07:28.333Z","etag":null,"topics":["bd-payment","laravel","laravel-nagad-payment","laravel-package","nagad-api","nagad-api-library","nagad-gateway","nagad-php-library","nagad-php-package","nagad-php-payment-gateway","payment","payments","php"],"latest_commit_sha":null,"homepage":"https://codeboxr.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeboxrcodehub.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-07-14T12:13:08.000Z","updated_at":"2025-08-02T09:05:48.000Z","dependencies_parsed_at":"2025-01-13T20:41:44.034Z","dependency_job_id":"88ed2c11-86bf-4571-83b7-fb6f45af224b","html_url":"https://github.com/codeboxrcodehub/nagad","commit_stats":{"total_commits":27,"total_committers":3,"mean_commits":9.0,"dds":0.2222222222222222,"last_synced_commit":"1a9abfa6ca247d8e9f0912f6a5a0b98b37b122f6"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/codeboxrcodehub/nagad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fnagad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fnagad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fnagad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fnagad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeboxrcodehub","download_url":"https://codeload.github.com/codeboxrcodehub/nagad/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fnagad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272077756,"owners_count":24869300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bd-payment","laravel","laravel-nagad-payment","laravel-package","nagad-api","nagad-api-library","nagad-gateway","nagad-php-library","nagad-php-package","nagad-php-payment-gateway","payment","payments","php"],"created_at":"2025-01-13T20:41:37.202Z","updated_at":"2025-08-25T14:12:57.919Z","avatar_url":"https://github.com/codeboxrcodehub.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nagad Payment Gateway for Laravel Framework/PHP project\n\n[![Downloads](https://img.shields.io/packagist/dt/codeboxr/nagad)](https://packagist.org/packages/codeboxr/nagad)\n[![Starts](https://img.shields.io/packagist/stars/codeboxr/nagad)](https://packagist.org/packages/codeboxr/nagad)\n\n## Features\n\nThis is a php/laravel wrapper package for [Nagad MFS](https://nagad.com.bd/)\n\n1. [Create Payment/Take to Payment Page](https://github.com/codeboxrcodehub/nagad#1-create-payment)\n2. [Verify Payment/Query Payment/Payment Details](https://github.com/codeboxrcodehub/nagad#2-verify-payment)\n3. [Refund Payment](https://github.com/codeboxrcodehub/nagad#3-refund-payment)\n\n## Requirements\n\n- PHP \u003e=7.4\n- Laravel \u003e= 6\n\n\n## Installation\n\n```bash\ncomposer require codeboxr/nagad\n```\n\n### vendor publish (config)\n\n```bash\nphp artisan vendor:publish --provider=\"Codeboxr\\Nagad\\NagadServiceProvider\"\n```\n\nAfter publish config file setup your credential. you can see this in your config directory nagad.php file\n\n```\n\"sandbox\"         =\u003e env(\"NAGAD_SANDBOX\", true), // if true it will redirect to sandbox url\n\"merchant_id\"     =\u003e env(\"NAGAD_MERCHANT_ID\", \"\"), \n\"merchant_number\" =\u003e env(\"NAGAD_MERCHANT_NUMBER\", \"\"),\n\"public_key\"      =\u003e env(\"NAGAD_PUBLIC_KEY\", \"\"),\n\"private_key\"     =\u003e env(\"NAGAD_PRIVATE_KEY\", \"\"),\n'timezone'        =\u003e 'Asia/Dhaka', // By default \n\"callback_url\"    =\u003e env(\"NAGAD_CALLBACK_URL\", \"http://127.0.0.1:8000/nagad/callback\"), // By default you can change it in your callback url\n\"response_type\"   =\u003e \"json\" // By default json you can change response type json/html \n```\n\n### Set .env configuration\n\n```\nNAGAD_SANDBOX=true // for production use false\nNAGAD_MERCHANT_ID=\"\"\nNAGAD_MERCHANT_NUMBER=\"\"\nNAGAD_PUBLIC_KEY=\"\"\nNAGAD_PRIVATE_KEY=\"\"\nNAGAD_CALLBACK_URL=\"\"\n```\n\n## Usage\n\n### 1. Create Payment\n\n```\nuse Codeboxr\\Nagad\\Payment\\Payment;\n\nreturn (new Payment)-\u003ecreate($amount, $invoiceNumber)  // 1st parameter is amount and 2nd is unique invoice number \n```\n\nor\n\n```\nuse Codeboxr\\Nagad\\Facade\\NagadPayment;\n\nreturn NagadPayment::create($amount, $invoiceNumber);\n```\n\n### 2. Verify Payment\n\n```\nuse Codeboxr\\Nagad\\Payment\\Payment;\n\n(new Payment)-\u003everify($paymentRefId) // $paymentRefId which you will find callback URL request parameter\n```\n\nor\n\n```\nuse Codeboxr\\Nagad\\Facade\\NagadPayment;\n\nNagadPayment::verify($paymentRefId);\n```\n\n### 3. Refund Payment\n\n```\nuse Codeboxr\\Nagad\\Payment\\Refund;\n\n(new Refund)-\u003erefund($paymentRefId,$refundAmount);\n```\n\nor\n\n```\nuse Codeboxr\\Nagad\\Facade\\NagadRefund;\n\nNagadRefund::refund($paymentRefId,$refundAmount);\n```\n\n\u003cspan style=\"color: #96d0ff\"\u003eNote: For the refund method, you have to pass two more parameters one is \u003cb\u003ereference no\u003c/b\u003e and another\n\u003cb\u003ereference message\u003c/b\u003e\u003c/span\u003e\n\n## Contributing\n\nContributions to the Nagad Payment Gateway package are welcome. Please note the following guidelines before submitting your pull\nrequest.\n\n- Follow [PSR-4](http://www.php-fig.org/psr/psr-4/) coding standards.\n- Read Nagad API documentations first. Please contact with Nagad for their api documentation and sandbox access.\n\n## License\n\nThis repository is licensed under the [MIT License](http://opensource.org/licenses/MIT).\n\nCopyright 2022 [Codeboxr](https://codeboxr.com). We are not not affiliated with Nagad and don't give any guarantee. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeboxrcodehub%2Fnagad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeboxrcodehub%2Fnagad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeboxrcodehub%2Fnagad/lists"}