{"id":17717919,"url":"https://github.com/ohmydevops/hesabfa-php-client","last_synced_at":"2026-05-03T02:43:07.182Z","repository":{"id":55536014,"uuid":"304955372","full_name":"ohmydevops/hesabfa-php-client","owner":"ohmydevops","description":"🧮 Simple PHP client for Hesabfa accounting system","archived":false,"fork":false,"pushed_at":"2023-01-12T17:56:04.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-08-02T13:57:41.893Z","etag":null,"topics":["hesabfa","laravel","php"],"latest_commit_sha":null,"homepage":"https://hesabfa.com","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/ohmydevops.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}},"created_at":"2020-10-17T19:38:49.000Z","updated_at":"2023-08-02T13:57:41.893Z","dependencies_parsed_at":"2023-02-09T13:01:33.489Z","dependency_job_id":null,"html_url":"https://github.com/ohmydevops/hesabfa-php-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmydevops%2Fhesabfa-php-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmydevops%2Fhesabfa-php-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmydevops%2Fhesabfa-php-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmydevops%2Fhesabfa-php-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohmydevops","download_url":"https://codeload.github.com/ohmydevops/hesabfa-php-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246466985,"owners_count":20782231,"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":["hesabfa","laravel","php"],"created_at":"2024-10-25T14:32:46.381Z","updated_at":"2026-05-03T02:43:02.161Z","avatar_url":"https://github.com/ohmydevops.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![StyleCI](https://github.styleci.io/repos/304955372/shield?branch=main)](https://github.styleci.io/repos/304955372?branch=main) [![Latest Stable Version](https://poser.pugx.org/amirbagh75/hesabfa-client/v)](//packagist.org/packages/amirbagh75/hesabfa-client) [![Total Downloads](https://poser.pugx.org/amirbagh75/hesabfa-client/downloads)](//packagist.org/packages/amirbagh75/hesabfa-client) [![License](https://poser.pugx.org/amirbagh75/hesabfa-client/license)](//packagist.org/packages/amirbagh75/hesabfa-client)\n\n## Unofficial PHP Package for hesabfa.com\n\nThis package makes it easier for php \u0026 laravel programmers to use the Hesabfa API.\n\n\u003cdiv dir='rtl'\u003e\nاگر نیازمند ارتباط با API حسابفا در PHP هستید، این پکیج کار شما رو راحت‌تر خواهد کرد.\n\u003c/div\u003e\n\n### How to install:\n```\ncomposer require amirbagh75/hesabfa-client\n```\n\n### Example\n```php\n\u003c?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse Amirbagh75\\HesabfaClient\\HesabfaClient;\nuse GuzzleHttp\\Exception\\GuzzleException;\n\n$userID = getenv('USER_ID');\n$userPassword = getenv('USER_PASSWORD');\n$apiKey = getenv('API_KEY');\n\n$hesabfa = new HesabfaClient($userID, $userPassword, $apiKey);\n\n\ntry {\n    $res = $hesabfa-\u003egetInvoices(1, [\n        'SortBy' =\u003e 'Date',\n        'SortDesc' =\u003e true,\n        'Take' =\u003e 1,\n        'Skip' =\u003e 0\n    ]);\n    print_r($res);\n} catch (GuzzleException $e) {\n    print_r('Problem happened: ' . $e-\u003egetMessage());\n}\n```\n\n\n### Example in laravel 8 (use Facades)\n\nFirst add these environment variables in your .env file:\n\n```\nHESABFA_USER_ID=\"xxxx\"\nHESABFA_USER_PASSWORD=\"xxxx\"\nHESABFA_API_KEY=\"xxxx\"\n```\nThen use it like the following example:\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\nuse HesabfaClient;\nuse Log;\n\nclass Example extends Controller\n{\n    /**\n     * Handle the incoming request.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return \\Illuminate\\Http\\Response\n     */\n    public function __invoke(Request $request)\n    {\n        // do something ...\n        try {\n            $res = HesabfaClient::getInvoices(1, [\n              'SortBy' =\u003e 'Date',\n              'SortDesc' =\u003e true,\n              'Take' =\u003e 1,\n              'Skip' =\u003e 0\n            ]);\n            dd($res);\n        } catch (\\GuzzleHttp\\Exception\\GuzzleException $e) {\n            Log::error($e-\u003egetMessage());\n        }\n        // do something ...\n    }\n}\n```\n\n\n### Current methods:\n\n\n```php\n// Contacts - docs: https://www.hesabfa.com/help/api/Contact\npublic function getContact(string $contactCode);\npublic function getContactsList(array $queryInfo);\npublic function getContactsByID(array $contactsID);\n\n// Invoices - docs: https://www.hesabfa.com/help/api/Invoice\npublic function getInvoices(string $invoiceType, array $queryInfo);\n\n// Hooks - docs: https://www.hesabfa.com/help/api/Hook\npublic function setWebHook(string $url, string $hookPassword);\n\n// Items - docs: https://www.hesabfa.com/help/api/Item\npublic function getItemByID(array $idList);\n```\n\n## Versioning\n\nWe use [Semantic Versioning](http://semver.org/). [See the available versions](https://github.com/amirbagh75/hesabfa-php-client/releases).\n\n## Authors\n\n- **[Amirhossein Baghaie](https://github.com/amirbagh75)** - _Maintainer_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmydevops%2Fhesabfa-php-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohmydevops%2Fhesabfa-php-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmydevops%2Fhesabfa-php-client/lists"}