teamfurther / fgo-php-sdk
A PHP SDK wrapper for fgo.ro API.
Requires
- php: >=8.0
- guzzlehttp/guzzle: ^7.8
README
The FGO PHP SDK provides convenient access to the FGO API from applications written in the PHP language.
Installation
You can install the package via composer:
composer require teamfurther/fgo-php-sdk
Tailwind config
There is a default Tailwind configuration included with this package. In order to enjoy all Cinderblock features, you should copy and extend this config.
Getting Started
Sample usage:
$client = new FGOClient( key: 'FGOKEY1234567890', merchantName: 'Your Company As Registered on FGO.ro Ltd.', merchantTaxId: 'RO12345678', platformUrl: $_SERVER['HTTP_HOST'], environment: FGOClient::ENV_PRODUCTION, ); $invoice = $client->invoice->create([ 'Client' => [ 'CodUnic' => '79792323', 'Denumire' => 'Client SRL', 'Tip' => 'PJ', ], 'Continut' => [ [ 'Denumire' => 'Abonament', 'NrProduse' => 1, 'PretUnitar' => 45, 'CotaTVA' => 19, 'UM' => 'lună', ], ], 'Serie' => 'KOMPZT', 'TipFactura' => 'Factura', 'Valuta' => 'RON', ]);
NOTE: You do not have include CodUnic or PlatformaURL
values in the request body for each call. These will be automatically appended from the initial client configuration.
Similarly, you don't have to include Hash
. This will be automatically generated and appended to the request body.
If you include these values, they will override the default client configuration.
Available Methods
Check out FGO API for more information.