The documentation for the package can be viewed by clicking the following link:
Following are some ways through which you can access the ininal provider:
// Import the class namespaces first, before using it directly
use ErdalDemirci\Ininal\Services\Ininal as IninalClient;
$provider = new IninalClient;
// Through facade. No need to import namespaces
$provider = \Ininal::setProvider();
The configuration file ininal.php is located in the config folder. Following are its contents when published:
return [
'mode' => env('ININAL_MODE', 'sandbox'), // Can only be 'sandbox' Or 'live'. If empty or invalid, 'live' will be used.
'api_key' => env('ININAL_API_KEY', ''),
'api_secret' => env('ININAL_API_SECRET', ''),
'locale' => env('ININAL_LOCALE', 'TR'), // force gateway language i.e. TR, EN
];
You can override Ininal API configuration by calling setApiCredentials
method:
$provider->setApiCredentials($config);
After setting the Ininal API configuration by calling setApiCredentials
method. You need to get access token before
performing any API calls
$provider->accessToken();
$response = $provider->userCreation(['name'=>'Ahmet','surname'=>'Ozperson','email'=>'ahmet@ahmet.com','gsmNumber'=>'5330000000','tcIdentificationNumber'=>'91111111119'
,'password'=>'123qweasd','birthDate'=>'1982-04-03','motherMaidenName'=>'yilmaz']);
{
"httpCode": 201,
"description": "string",
"response": {
"userToken": "0014c0b5-6bf0-467f-bbf4-7a100b06927e"
},
"validationErrors": {
"property1": "string",
"property2": "string"
}
}
$response = $provider->userInformation($user_token = '0014c0b5-6bf0-467f-bbf4-7a100b06927e');
{
"httpCode": 200,
"description": "string",
"response": {
"userToken": "0014c0b5-6bf0-467f-bbf4-7a100b06927e",
"name": "Ahmet",
"surname": "Ozperson",
"email": "ahmet.ozperson@ininal.com",
"gsmNumber": "5500000000",
"tckn": "11111111111",
"birthdate": "1992-05-26",
"status": "ACTIVE"
},
"validationErrors": {
"property1": "string",
"property2": "string"
}
}
This version supports Laravel 6 or greater.
- In case of any issues, kindly create one on the Issues section.
- If you would like to contribute:
- Fork this repository.
- Implement your features.
- Generate pull request.