https://github.com/ohmydevops/hesabfa-php-client
🧮 Simple PHP client for Hesabfa accounting system
https://github.com/ohmydevops/hesabfa-php-client
hesabfa laravel php
Last synced: about 2 months ago
JSON representation
🧮 Simple PHP client for Hesabfa accounting system
- Host: GitHub
- URL: https://github.com/ohmydevops/hesabfa-php-client
- Owner: ohmydevops
- License: mit
- Created: 2020-10-17T19:38:49.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T17:56:04.000Z (over 3 years ago)
- Last Synced: 2023-08-02T13:57:41.893Z (almost 3 years ago)
- Topics: hesabfa, laravel, php
- Language: PHP
- Homepage: https://hesabfa.com
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.styleci.io/repos/304955372?branch=main) [](//packagist.org/packages/amirbagh75/hesabfa-client) [](//packagist.org/packages/amirbagh75/hesabfa-client) [](//packagist.org/packages/amirbagh75/hesabfa-client)
## Unofficial PHP Package for hesabfa.com
This package makes it easier for php & laravel programmers to use the Hesabfa API.
اگر نیازمند ارتباط با API حسابفا در PHP هستید، این پکیج کار شما رو راحتتر خواهد کرد.
### How to install:
```
composer require amirbagh75/hesabfa-client
```
### Example
```php
getInvoices(1, [
'SortBy' => 'Date',
'SortDesc' => true,
'Take' => 1,
'Skip' => 0
]);
print_r($res);
} catch (GuzzleException $e) {
print_r('Problem happened: ' . $e->getMessage());
}
```
### Example in laravel 8 (use Facades)
First add these environment variables in your .env file:
```
HESABFA_USER_ID="xxxx"
HESABFA_USER_PASSWORD="xxxx"
HESABFA_API_KEY="xxxx"
```
Then use it like the following example:
```php
'Date',
'SortDesc' => true,
'Take' => 1,
'Skip' => 0
]);
dd($res);
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
Log::error($e->getMessage());
}
// do something ...
}
}
```
### Current methods:
```php
// Contacts - docs: https://www.hesabfa.com/help/api/Contact
public function getContact(string $contactCode);
public function getContactsList(array $queryInfo);
public function getContactsByID(array $contactsID);
// Invoices - docs: https://www.hesabfa.com/help/api/Invoice
public function getInvoices(string $invoiceType, array $queryInfo);
// Hooks - docs: https://www.hesabfa.com/help/api/Hook
public function setWebHook(string $url, string $hookPassword);
// Items - docs: https://www.hesabfa.com/help/api/Item
public function getItemByID(array $idList);
```
## Versioning
We use [Semantic Versioning](http://semver.org/). [See the available versions](https://github.com/amirbagh75/hesabfa-php-client/releases).
## Authors
- **[Amirhossein Baghaie](https://github.com/amirbagh75)** - _Maintainer_