An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

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)

## 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_