{"id":23425481,"url":"https://github.com/jubaerhossain/sslcommerz-go","last_synced_at":"2026-01-31T13:43:01.871Z","repository":{"id":250283139,"uuid":"834009459","full_name":"JubaerHossain/sslcommerz-go","owner":"JubaerHossain","description":"A Go package for integrating the SSLCommerz payment gateway. It provides functions to initiate payments and handle responses. The package is modular with separate configurations and HTTP client handling.","archived":false,"fork":false,"pushed_at":"2024-10-15T11:05:24.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T17:49:36.923Z","etag":null,"topics":["payment-gateway","sslcommerz","sslcommerz-golang","sslcommerz-payment","sslcommerz-payment-gateway"],"latest_commit_sha":null,"homepage":"","language":"Go","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/JubaerHossain.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,"zenodo":null}},"created_at":"2024-07-26T08:28:02.000Z","updated_at":"2024-10-15T11:04:54.000Z","dependencies_parsed_at":"2025-04-12T17:45:12.800Z","dependency_job_id":"61bf509b-4321-4fd1-8e2e-bd57bfe1b9ca","html_url":"https://github.com/JubaerHossain/sslcommerz-go","commit_stats":null,"previous_names":["jubaerhossain/sslcommerz-go"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/JubaerHossain/sslcommerz-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JubaerHossain%2Fsslcommerz-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JubaerHossain%2Fsslcommerz-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JubaerHossain%2Fsslcommerz-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JubaerHossain%2Fsslcommerz-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JubaerHossain","download_url":"https://codeload.github.com/JubaerHossain/sslcommerz-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JubaerHossain%2Fsslcommerz-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28944789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T13:02:32.153Z","status":"ssl_error","status_checked_at":"2026-01-31T13:00:07.528Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["payment-gateway","sslcommerz","sslcommerz-golang","sslcommerz-payment","sslcommerz-payment-gateway"],"created_at":"2024-12-23T05:12:52.758Z","updated_at":"2026-01-31T13:43:01.856Z","avatar_url":"https://github.com/JubaerHossain.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSLCommerz-Go\n\nA Go package for integrating with the SSLCommerz payment gateway. This package provides functions to initiate payments and handle responses, structured in a modular way for easy management and extension.\n\n## Project Structure\n\n```\nsslcommerz-go/\n├── config/\n│   └── config.go\n├── client/\n│   └── client.go\n├── sslcommerz/\n│   └── sslcommerz.go\n├── examples/\n│   └── main.go\n├── go.mod\n└── go.sum\n```\n\n### Description of Files\n\n- **config/config.go**: Handles configuration settings, such as storing the store ID and password.\n- **client/client.go**: Manages HTTP requests to the SSLCommerz API.\n- **sslcommerz/sslcommerz.go**: Implements payment processing functions, such as initiating payments.\n- **examples/main.go**: Provides an example usage of the package, demonstrating how to initiate a payment request.\n\n## Installation\n\n1. **Install**:\n   ```sh\n   go get -u github.com/JubaerHossain/sslcommerz-go\n   ```\n\n2. **Set up Go modules**:\n   ```sh\n   go mod tidy\n   ```\n\n## Configuration\n\nSet the following environment variables with your SSLCommerz credentials:\n\n```sh\nexport SSLCOMMERZ_STORE_ID=your_store_id\nexport SSLCOMMERZ_STORE_PASS=your_store_password\n```\n\n## Usage\n\n### Example Usage\n\nThe following example demonstrates how to initiate a payment request using the package.\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"log\"\n    \"github.com/yourusername/sslcommerz-go/sslcommerz\"\n)\n\nfunc main() {\n  paymentRequest := \u0026sslcommerzEntity.PaymentRequest{\n\t\tTotalAmount:      103,\n\t\tCurrency:         \"BDT\",\n\t\tTransactionID:     \"SSLCZ_TEST_\" + GenerateUniqueID(),\n\t\tSuccessURL:        \"http://localhost:8080/success\",\n\t\tFailURL:           \"http://localhost:8080/fail\",\n\t\tCancelURL:         \"http://localhost:8080/cancel\",\n\t\tIPNURL:            \"http://localhost:8080/ipn\",\n\t\tCustomerName:     \"Test Customer\",\n\t\tCustomerEmail:    \"test@test.com\",\n\t\tCustomerAddress1: \"Dhaka\",\n\t\tCustomerAddress2: \"Dhaka\",\n\t\tCustomerCity:     \"Dhaka\",\n\t\tCustomerState:    \"Dhaka\",\n\t\tCustomerPostcode: \"1000\",\n\t\tCustomerCountry:  \"Bangladesh\",\n\t\tCustomerPhone:    \"01711111111\",\n\t\tCustomerFax:      \"01711111111\",\n\t\tShippingMethod:   \"No\",\n\t\tShippingName:     \"Store Test\",\n\t\tShippingAddress1: \"Dhaka\",\n\t\tShippingAddress2: \"Dhaka\",\n\t\tShippingCity:     \"Dhaka\",\n\t\tShippingState:    \"Dhaka\",\n\t\tShippingPostcode: \"1000\",\n\t\tShippingCountry:  \"Bangladesh\",\n\t\tValueA:           \"ref001\",\n\t\tValueB:           \"ref002\",\n\t\tValueC:           \"ref003\",\n\t\tValueD:           \"ref004\",\n\t\tProductName:      \"Computer\",\n\t\tProductCategory:  \"Goods\",\n\t\tProductProfile:   \"physical-goods\",\n\t}\n\n\tsslc := sslcommerz.NewSSLCommerz()\n\tresponse, err := sslc.InitiatePayment(paymentRequest)\n\tif err != nil {\n\t\tlog.Printf(\"Error initiating payment: %v\", err)\n\t\thttp.Error(w, \"Internal Server Error: Payment initiation failed\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n    fmt.Printf(\"Payment Response: %+v\\n\", response)\n\n    // Redirect to the payment gateway\n}\n```\n\n### Run the Example\n\n1. Set environment variables:\n   ```sh\n   export SSLCOMMERZ_STORE_ID=your_store_id\n   export SSLCOMMERZ_STORE_PASS=your_store_password\n   ```\n\n2. Run the example:\n   ```sh\n   go run examples/main.go\n   ```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request or open an issue.\n\n## Acknowledgements\n\nThanks to the SSLCommerz team for providing the API and documentation.\n\n## Contact\n\nFor any questions or feedback, please open an issue or contact me at your-email@example.com.\n\n---\n\nThis README provides a comprehensive guide for using the SSLCommerz-Go package, including setup, configuration, and example usage.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjubaerhossain%2Fsslcommerz-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjubaerhossain%2Fsslcommerz-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjubaerhossain%2Fsslcommerz-go/lists"}