PHP code example of erdaldemirci / laravel-ininal

1. Go to this page and download the library: Download erdaldemirci/laravel-ininal library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

erdaldemirci / laravel-ininal example snippets


// 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();

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
];

$provider->setApiCredentials($config);

$provider->accessToken();

$response = $provider->userCreation(['name'=>'Ahmet','surname'=>'Ozperson','email'=>'[email protected]','gsmNumber'=>'5330000000','tcIdentificationNumber'=>'91111111119'
,'password'=>'123qweasd','birthDate'=>'1982-04-03','motherMaidenName'=>'yilmaz']);

$response = $provider->userInformation($user_token = '0014c0b5-6bf0-467f-bbf4-7a100b06927e');