Download the PHP package kiralyta/ntak-php without Composer
On this page you can find all versions of the php package kiralyta/ntak-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ntak-php
NTAK RMS PHP API / SDK
Welcome to my little package, that helps you make NTAK RMS requests like a boss.
Table of Contents:
- Installation
- Usage
- Create an API Client Instance
- Create an Order Item Instance
- Create a Payment Instance
- Create an Order Instance
- Store, Update, Destroy Order (Rendelésösszesítő)
- Close Day (Napzárás)
- Verify (Ellenőrzés)
- Enums
- Contribution
- Last Words
Installation
The package requires PHP ^8.1 since it was built around PHP enums.
For PHP 7, see Natsu007/ntak-php fork.
Usage
Instances
Create an API Client Instance
Your file is basically a concatenated file of your and files.
It is recommended to have a singleton instance during one request cycle. This means, you can create multiple requests with a single instance.
You can get the last request, response and respone time (in milliseconds) from the client.
Create an Order Item Instance
- NTAKCategory
- NTAKSubcategory
- NTAKVat
- NTAKAmount
Create a Payment Instance
- NTAKPaymentType
Create an Order Instance
When you are updating / destroying an order, you need to provide (generate) a new
orderId
with each requests.In these cases, the
ntakOrderId
is always the last providedorderId
.
- NTAKOrderType
- NTAKOrderItem
- NTAKPayment
Messages (Requests)
Store, Update, Destroy Order (Rendelésösszesítő)
Returns the NTAK process ID string.
- NTAKOrder
Close Day (Napzárás)
Returns the NTAK process ID string.
- NTAKDayType
Verify (Ellenőrzés)
Returns an instance
If you encounter an unsuccessful message, you should further examine NTAKVerifyStatus. It's recommended to wait at least 60 seconds before the first verification attempt of a processs ID. You can verify multiple order with verifyALl(array of process ids) - which returning an array of instance
Enums
Namespace of the enums:
You can use the static method on any of the enums, in order to get the available values.
NTAKAmount
name | value string |
---|---|
DARAB | darab |
LITER | liter |
KILOGRAMM | kilogramm |
EGYSEG | egyseg |
NTAKCategory
name | value string |
---|---|
ETEL | Étel |
ALKMENTESITAL_HELYBEN | Helyben készített alkoholmentes ital |
ALKMENTESITAL_NEM_HELYBEN | Nem helyben készített alkoholmentes ital |
ALKOHOLOSITAL | Alkoholos Ital |
EGYEB | Egyéb |
NTAKSubcategory
name | value string |
---|---|
REGGELI | reggeli |
SZENDVICS | szendvics |
ELOETEL | előétel |
LEVES | leves |
FOETEL | főétel |
KORET | köret |
SAVANYUSAG_SALATA | savanyúság/saláta |
KOSTOLO | kóstolóétel, kóstolófalat |
PEKSUTEMENY | péksütemény, pékáru |
DESSZERT | desszert |
SNACK | snack |
FOETEL_KORETTEL | főétel körettel |
ETELCSOMAG | ételcsomag |
EGYEB | egyéb |
VIZ | víz |
LIMONADE_SZORP_FACSART | limonádé / szörp / frissen facsart ital |
ALKOHOLMENTES_KOKTEL | alkoholmentes koktél, alkoholmentes kevert ital |
TEA_FORROCSOKOLADE | tea, forrócsoki és egyéb tejalapú italok |
ITALCSOMAG | italcsomag |
KAVE | kávé |
ROSTOS_UDITO | rostos üdítő |
SZENSAVAS_UDITO | szénsavas üdítő |
SZENSAVMENTES_UDITO | szénsavmentes üdítő |
KOKTEL | koktél, kevert ital |
LIKOR | likőr |
PARLAT | párlat |
SOR | sör |
BOR | bor |
PEZSGO | pezsgő |
SZERVIZDIJ | szervizdíj |
BORRAVALO | borravaló |
KISZALLITASI_DIJ | kiszállítási díj |
NEM_VENDEGLATAS | nem vendéglátás |
KORNYEZETBARAT_CSOMAGOLAS | környezetbarát csomagolás |
MUANYAG_CSOMAGOLAS | műanyag csomagolás |
KEDVEZMENY | kedvezmény |
NTAKDayType
name | value string |
---|---|
ADOTT_NAPON_ZARVA | Adott napon zárva |
FORGALOM_NELKULI_NAP | Forgalom nélküli nap |
NORMAL_NAP | Normál nap |
NTAKOrderType
name | value string |
---|---|
NORMAL | Normál |
SZTORNO | Storno |
HELYESBITO | Helyesbítő |
NTAKPaymentType
name | value string |
---|---|
KESZPENZHUF | Készpénz huf |
KESZPENZEUR | Készpénz eur |
SZEPKARTYA | Szépkártya |
BANKKARTYA | Bankkártya |
ATUTALAS | Átutalás |
EGYEB | Egyéb |
VOUCHER | Voucher |
SZOBAHITEL | Szobahitel |
KEREKITES | Kerekítés |
NTAKVat
name | value string |
---|---|
A_5 | 5% |
B_18 | 18% |
C_27 | 27% |
D_AJT | Ajt |
E_0 | 0% |
NTAKVerifyStatus
name | value string |
---|---|
BEFOGADVA | BEFOGADVA |
TELJESEN_HIBAS | TELJESEN_HIBAS |
RESZBEN_SIKERES | RESZBEN_SIKERES |
TELJESEN_SIKERES | TELJESEN_SIKERES |
UJRA_KULDENDO | UJRA_KULDENDO |
Contribution
Run Tests
Put your and files in directory, then run:
Last Words
I am not taking any responsiblities for the use of this package.
This is simply a personal project that could help other fellow software artisans to make requests to MTÜ.
It's still recommended to read the documentation of the RMS Interface, even in case of using this package.
Please feel free to open an issue if you encounter one.
All versions of ntak-php with dependencies
guzzlehttp/guzzle Version ^7.0
nesbot/carbon Version ^2.66
gamegos/jws Version ^1.0