{"id":20120325,"url":"https://github.com/md-asifiqbal/sam-sslcommerz-","last_synced_at":"2026-05-18T06:34:50.321Z","repository":{"id":62539645,"uuid":"422093551","full_name":"md-asifiqbal/SAM-SSLCommerz-","owner":"md-asifiqbal","description":"SSLCOMMERZ is the largest payment gateway aggregator in Banglades","archived":false,"fork":false,"pushed_at":"2021-10-29T06:09:06.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T09:27:42.284Z","etag":null,"topics":["bangladesh-payment","laravel","payment-gateway","sslcommerz"],"latest_commit_sha":null,"homepage":"","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/md-asifiqbal.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}},"created_at":"2021-10-28T06:41:25.000Z","updated_at":"2021-10-28T08:25:41.000Z","dependencies_parsed_at":"2022-11-02T15:46:15.192Z","dependency_job_id":null,"html_url":"https://github.com/md-asifiqbal/SAM-SSLCommerz-","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/md-asifiqbal/SAM-SSLCommerz-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-asifiqbal%2FSAM-SSLCommerz-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-asifiqbal%2FSAM-SSLCommerz-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-asifiqbal%2FSAM-SSLCommerz-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-asifiqbal%2FSAM-SSLCommerz-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/md-asifiqbal","download_url":"https://codeload.github.com/md-asifiqbal/SAM-SSLCommerz-/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-asifiqbal%2FSAM-SSLCommerz-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272805572,"owners_count":24995916,"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-30T02:00:09.474Z","response_time":77,"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":["bangladesh-payment","laravel","payment-gateway","sslcommerz"],"created_at":"2024-11-13T19:19:40.676Z","updated_at":"2026-05-18T06:34:50.278Z","avatar_url":"https://github.com/md-asifiqbal.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSLCommerz\n[SSLCommerz](https://www.sslcommerz.com) Payment gateway library for Laravel framework. Official documentation is [here](https://developer.sslcommerz.com/docs.html).\n\n## install\n```\ncomposer require sam-asif/sslcommerz\n```\n\n\n## Provider\n\nYou need to update your application configuration in order to register the package so it can be loaded by Laravel, just update your `config/app.php` file adding the following code at the end of your `'providers'` section:\n\n\u003e `config/app.php`\n\n```php\n\u003c?php\n\nreturn [\n    // ...\n    'providers' =\u003e [\n        SamAsif\\Sslcommerz\\SSLCommerzServiceProvider::class,\n        // ...\n    ],\n    // ...\n];\n```\n\n### publish\n```\nphp artisan vendor:publish\n```\nThis command will create a `sslcommerz.php` file inside the `config` directory. Configure your parameters in your `.env` file\n\n\nIf your request value contain following key \n\n```\ntotal_amount\ncurrency\ntran_id\ncus_name\ncus_email\ncus_add1\ncus_add2\ncus_city\ncus_state\ncus_postcode\ncus_country\ncus_phone\ncus_fax\nship_name\nship_add1\nship_add2\nship_city\nship_state\nship_postcode\nship_phone\nship_country\nshipping_method\nproduct_name\nproduct_category\nproduct_profile\nvalue_a\nvalue_b\nvalue_c\nvalue_d\n``` \n\nThen just call the controller method.\n\n```php\n\u003c?php\n\nuse SamAsif\\Sslcommerz\\Http\\Controllers\\SamSSL;\n\n\nclass OrderController extends Controller\n{\n\n public function Order(Request $request)\n    {\n\n    \t// .......\n\n    \t$sslc = new SamSSL();\n        $payment_options = $sslc-\u003eindex($request, 'hosted');\n\n\n\n        if (!is_array($payment_options)) {\n            print_r($payment_options);\n            $payment_options = array();\n        }\n\n    }\n\n}\n\n```\n\nIf your request value dostn't  contain those key, then define an array with those key and call the controller function. \n\n\n```php\n\u003c?php\n\nuse SamAsif\\Sslcommerz\\Http\\Controllers\\SamSSL;\n\n\nclass OrderController extends Controller\n{\n\n public function Order(Request $request)\n    {\n\n    \t$post_data = array();\n        $post_data['total_amount'] = '10'; # You cant not pay less than 10\n        $post_data['currency'] = \"BDT\";\n        $post_data['tran_id'] = uniqid(); // tran_id must be unique\n        // .......\n    \t\n\n    \t// Initialize SSlcommerz gateway\n\n    \t$sslc = new SamSSL();\n        $payment_options = $sslc-\u003eindex($post_data, 'hosted');\n\n\n\n        if (!is_array($payment_options)) {\n            print_r($payment_options);\n            $payment_options = array();\n        }\n\n    }\n\n\n    // For received return  value\n\n    public function return(Request $request){\n      return $request-\u003eall();\n    }\n\n}\n\n```\n\n### Web Route\n```\nRoute::post('/sslcommerz/return', 'OrderController::class@return')-\u003ename('sslcommerz.return');\n\n```\n\nThis route for the received the return value from SSLCommerz gateway.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmd-asifiqbal%2Fsam-sslcommerz-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmd-asifiqbal%2Fsam-sslcommerz-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmd-asifiqbal%2Fsam-sslcommerz-/lists"}