{"id":17437152,"url":"https://github.com/datlechin/sepay-php","last_synced_at":"2025-06-25T13:04:17.113Z","repository":{"id":257806755,"uuid":"863995725","full_name":"datlechin/sepay-php","owner":"datlechin","description":"SePay PHP - Giải pháp chia sẻ biến động số dư, cổng thanh toán trực tuyến và API Ngân hàng.","archived":false,"fork":false,"pushed_at":"2025-02-20T02:59:17.000Z","size":16,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T13:04:13.648Z","etag":null,"topics":["api","php","sepay","sepayvn"],"latest_commit_sha":null,"homepage":"https://sepay.vn","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/datlechin.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-09-27T09:49:19.000Z","updated_at":"2025-06-23T13:29:39.000Z","dependencies_parsed_at":"2024-10-03T02:54:50.973Z","dependency_job_id":"5bdb2357-3756-4ac5-9785-c11fa614bd25","html_url":"https://github.com/datlechin/sepay-php","commit_stats":null,"previous_names":["datlechin/sepay-php"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/datlechin/sepay-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datlechin%2Fsepay-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datlechin%2Fsepay-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datlechin%2Fsepay-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datlechin%2Fsepay-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datlechin","download_url":"https://codeload.github.com/datlechin/sepay-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datlechin%2Fsepay-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261879271,"owners_count":23223736,"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","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":["api","php","sepay","sepayvn"],"created_at":"2024-10-17T11:06:10.945Z","updated_at":"2025-06-25T13:04:17.101Z","avatar_url":"https://github.com/datlechin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SePay PHP\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/datlechin/sepay-php.svg?style=flat-square)](https://packagist.org/packages/datlechin/sepay-php)\n[![Tests](https://img.shields.io/github/actions/workflow/status/datlechin/sepay-php/tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/datlechin/sepay-php/actions/workflows/tests.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/datlechin/sepay-php.svg?style=flat-square)](https://packagist.org/packages/datlechin/sepay-php)\n\nSePay PHP là một thư viện PHP giúp tích hợp dịch vụ thanh toán SePay vào ứng dụng của bạn một cách dễ dàng. Thư viện này cung cấp các phương thức để quản lý tài khoản ngân hàng, theo dõi giao dịch và xử lý webhook.\n\n## Cài đặt\n\nBạn có thể cài đặt gói này thông qua Composer:\n\n```bash\ncomposer require datlechin/sepay-php\n```\n\n## Cách sử dụng\n\n### Khởi tạo Client\n\nVào trang [SePay](https://my.sepay.vn/companyapi) để lấy API Key.\n\n```php\nuse Datlechin\\SePay\\SePay;\n\n$client = SePay::client('your_api_key_here');\n```\n\n### Quản lý tài khoản ngân hàng\n\n```php\n// Lấy danh sách tài khoản ngân hàng\n$bankAccounts = $client-\u003ebankAccounts()-\u003elist();\n\n// Lấy thông tin một tài khoản cụ thể\n$account = $client-\u003ebankAccounts()-\u003eget($accountId);\n\n// Đếm số lượng tài khoản\n$count = $client-\u003ebankAccounts()-\u003ecount();\n```\n\n### Quản lý giao dịch\n\n```php\n// Lấy danh sách giao dịch\n$transactions = $client-\u003etransactions()-\u003elist();\n\n// Lấy thông tin một giao dịch cụ thể\n$transaction = $client-\u003etransactions()-\u003eget($transactionId);\n\n// Đếm số lượng giao dịch\n$count = $client-\u003etransactions()-\u003ecount();\n```\n\n### Xử lý Webhook\n\n```php\nuse Datlechin\\SePay\\SePay;\nuse Datlechin\\SePay\\Webhook\\Payload;\nuse Datlechin\\SePay\\Webhook\\Webhook;\n\nSePay::webhook()\n    -\u003esetAuthorization(Webhook::AUTH_API_KEY, 'your_api_key_here')\n    -\u003ehandle(function (Payload $payload) {\n    // Xử lý webhook như lưu thông tin giao dịch hay cập nhật trạng thái đơn hàng...\n\n    return true; // Trả về true để xác nhận webhook hợp lệ hoặc false nếu không hợp lệ\n});\n```\n\n## Kiểm thử\n\n```bash\ncomposer test\n```\n\n## Tác giả\n\n- [Ngo Quoc Dat](https://github.com/datlechin)\n- [Tất cả những người đóng góp](../../contributors)\n\n## Giấy phép\n\nGiấy phép MIT (MIT). Vui lòng xem [Tệp Giấy phép](LICENSE) để biết thêm thông tin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatlechin%2Fsepay-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatlechin%2Fsepay-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatlechin%2Fsepay-php/lists"}