{"id":36672278,"url":"https://github.com/captain-corgi/vcd-go-sepay-example","last_synced_at":"2026-01-12T10:42:43.480Z","repository":{"id":291057430,"uuid":"976405449","full_name":"captain-corgi/vcd-go-sepay-example","owner":"captain-corgi","description":"Vibe Coding - Sepay Integration using Go","archived":false,"fork":false,"pushed_at":"2025-06-13T11:14:28.000Z","size":749,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T12:18:48.316Z","etag":null,"topics":["clean-architecture","domain-driven-design","golang","vibe-coding"],"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/captain-corgi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2025-05-02T03:54:23.000Z","updated_at":"2025-05-16T07:52:42.000Z","dependencies_parsed_at":"2025-05-02T06:41:19.009Z","dependency_job_id":null,"html_url":"https://github.com/captain-corgi/vcd-go-sepay-example","commit_stats":null,"previous_names":["captain-corgi/vcd-go-sepay-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/captain-corgi/vcd-go-sepay-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captain-corgi%2Fvcd-go-sepay-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captain-corgi%2Fvcd-go-sepay-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captain-corgi%2Fvcd-go-sepay-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captain-corgi%2Fvcd-go-sepay-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/captain-corgi","download_url":"https://codeload.github.com/captain-corgi/vcd-go-sepay-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captain-corgi%2Fvcd-go-sepay-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:40:25.642Z","status":"ssl_error","status_checked_at":"2026-01-12T10:39:27.820Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["clean-architecture","domain-driven-design","golang","vibe-coding"],"created_at":"2026-01-12T10:42:42.802Z","updated_at":"2026-01-12T10:42:43.472Z","avatar_url":"https://github.com/captain-corgi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sepay Payment Gateway Integration\n\nA robust Go backend service for integrating with Sepay payment gateway, providing real-time transaction monitoring and automatic payment confirmation through webhooks.\n\n## Features\n\n- VietQR code generation for bank transfers\n- Webhook endpoint for receiving payment notifications\n- MySQL database integration for order and transaction storage\n- Clean Architecture implementation with DDD principles\n- Secure authentication with API key validation\n- Comprehensive test suite\n- CI/CD pipeline setup with GitHub Actions\n\n## Prerequisites\n\n- Go 1.24 or higher\n- MySQL 5.7 or higher\n- Docker (optional, for containerization)\n\n## Getting Started\n\n### Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/captain-corgi/vcd-go-sepay-example.git\ncd vcd-go-sepay-example\n```\n\n2. Install dependencies:\n\n```bash\ngo mod download\n```\n\n3. Set up environment variables:\n\n```bash\n# Server configuration\nexport SERVER_PORT=8080\nexport SERVER_READ_TIMEOUT=10\nexport SERVER_WRITE_TIMEOUT=10\nexport SERVER_SHUTDOWN_TIMEOUT=5\n\n# Database configuration\nexport DB_DRIVER=mysql\nexport DB_HOST=localhost\nexport DB_PORT=3306\nexport DB_USER=root\nexport DB_PASSWORD=password\nexport DB_NAME=sepay\nexport DB_MAX_OPEN_CONNS=10\nexport DB_MAX_IDLE_CONNS=5\n\n# Sepay configuration\nexport SEPAY_API_KEY=your_api_key_here\nexport SEPAY_BANK_ID=your_bank_id_here\nexport SEPAY_ACCOUNT_NUMBER=your_account_number_here\nexport SEPAY_ACCOUNT_NAME=your_account_name_here\nexport SEPAY_WEBHOOK_SECRET=your_webhook_secret_here\nexport SEPAY_WEBHOOK_BASE_URL=https://api.example.com\n```\n\n4. Create database tables:\n\n```sql\nCREATE TABLE orders (\n    id VARCHAR(36) PRIMARY KEY,\n    customer_id VARCHAR(36) NOT NULL,\n    amount BIGINT NOT NULL,\n    status VARCHAR(20) NOT NULL,\n    description TEXT,\n    created_at DATETIME NOT NULL,\n    updated_at DATETIME NOT NULL\n);\n\nCREATE TABLE transactions (\n    id VARCHAR(36) PRIMARY KEY,\n    order_id VARCHAR(36) NOT NULL,\n    amount BIGINT NOT NULL,\n    status VARCHAR(20) NOT NULL,\n    payment_method VARCHAR(50) NOT NULL,\n    payment_reference VARCHAR(100),\n    bank_name VARCHAR(100),\n    description TEXT,\n    created_at DATETIME NOT NULL,\n    updated_at DATETIME NOT NULL,\n    FOREIGN KEY (order_id) REFERENCES orders(id)\n);\n\nCREATE INDEX idx_transactions_order_id ON transactions(order_id);\nCREATE INDEX idx_orders_customer_id ON orders(customer_id);\n```\n\n### Running the Application\n\n1. Build the application:\n\n```bash\ngo build -o sepay-service ./cmd/server\n```\n\n2. Run the server:\n\n```bash\n./sepay-service\n```\n\nThe server will start at http://localhost:8080 (or the port specified in your environment variables).\n\n### Docker Deployment\n\n1. Build the Docker image:\n\n```bash\ndocker build -t sepay-integration .\n```\n\n2. Run the container:\n\n```bash\ndocker run -p 8080:8080 \\\n  -e DB_HOST=host.docker.internal \\\n  -e SEPAY_API_KEY=your_api_key_here \\\n  -e SEPAY_BANK_ID=your_bank_id_here \\\n  -e SEPAY_ACCOUNT_NUMBER=your_account_number_here \\\n  -e SEPAY_ACCOUNT_NAME=your_account_name_here \\\n  sepay-integration\n```\n\n## API Documentation\n\nSee [API Documentation](docs/API-Documentation.md) for detailed information about the available endpoints.\n\n## Sepay Integration Guide\n\nSee [Sepay Guideline](docs/Sepay-Guideline.md) for comprehensive information about integrating with Sepay payment gateway.\n\n## Architecture\n\nThis project follows Clean Architecture principles with a domain-driven design approach:\n\n- **Domain Layer**: Core business logic and entities\n- **Use Case Layer**: Application-specific business rules\n- **Interface Adapters Layer**: Adapters for external services and repositories\n- **Frameworks \u0026 Drivers Layer**: External frameworks and tools\n\n```\nsepay-integration/\n├── cmd/\n│   └── server/\n│       └── main.go                  # Application entry point\n├── internal/\n│   ├── domain/                      # Domain Layer\n│   │   ├── entity/\n│   │   ├── repository/\n│   │   └── service/\n│   ├── usecase/                     # Use Case Layer\n│   ├── adapter/                     # Interface Adapters Layer\n│   │   ├── api/\n│   │   ├── repository/\n│   │   └── qrcode/\n│   └── infrastructure/              # Frameworks \u0026 Drivers Layer\n│       ├── config/\n│       ├── persistence/\n│       └── sepay/\n└── pkg/                             # Shared packages\n    ├── logger/\n    └── errors/\n```\n\n## Testing\n\nRun the tests:\n\n```bash\ngo test ./...\n```\n\nFor test coverage:\n\n```bash\ngo test -coverprofile=coverage.out ./...\ngo tool cover -html=coverage.out\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin feature/my-new-feature`)\n5. Create a new Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n## Acknowledgments\n\n- [Sepay](https://sepay.vn) for the payment gateway integration\n- [Echo Framework](https://echo.labstack.com/) for the web framework\n- [Go-QRCode](https://github.com/skip2/go-qrcode) for QR code generation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptain-corgi%2Fvcd-go-sepay-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptain-corgi%2Fvcd-go-sepay-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptain-corgi%2Fvcd-go-sepay-example/lists"}