PHP code example of finbricks / finbricks-php-sdk

1. Go to this page and download the library: Download finbricks/finbricks-php-sdk 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/ */

    

finbricks / finbricks-php-sdk example snippets


$encryptor = new AsymmetricEncryptor($key="here is your private key.");
$client = (new FinbricksClient($encryptor))->getClient();
$authApiConfiguration = new  Configuration(); // All api have configuration please be sure you import the correct one
$authApiConfiguration->setHost("https://api.zaplaceno.cleverlance.com"); // Here paste where is API server (sandbox or prod)
$authApi = new AuthApi($this->client, $authApiConfiguration); // Instantiate SDK with client and configuration.


$req = new AuthenticateRequest(); // Create a class of request 
$req->setScope(Enums::AISP_PISP); // You can use Enums class for scopes
$req->setClientId("someClientId");
$req->setCallbackUrl("http://google.com");
$req->setProvider("KB");
$req->setMerchantId("4d605d8e-4c31-43eb-bf8b-0ce041d4ef1b"); // Here is your merchantID

// Make a call of api and receive response
$response = $this->authApi->authAuthenticatePost("", $req); // If you generate a client with AsymmetricEncryptor then you dont need to paste signature. Fill it with empty string.
bash
    composer