PHP code example of simp2 / sdk

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

    

simp2 / sdk example snippets


use SIMP2\SDK\SIMP2SDK;

$sdk = new SIMP2SDK();
$sdk->setCompanyTransactionToken($cct);
$debts = $sdk->getDebtsOfClient($client_identifier);

notifyPayment(string $unique_reference): void

confirmPayment(string $unique_reference): Response

notifyRollbackPayment(string $unique_reference): Response

confirmRollbackPayment(string $unique_reference): Response

createMetadata(string $key, string|array $value): void

infoEvent(string $unique_reference, string $observations, ?string $category, TypeDescription $type_description, LogLevel $logLevel, int $overwriteLogLevel = null)

errorEvent(string $unique_reference, string $observations, ?string $category, TypeDescription $type_description, LogLevel $logLevel, int $overwriteLogLevel = null)

getMetadata(string $key): string|array|null

getDebtInfo($code): ?Debt

getDebtsOfClient(string $ccf_client_id): array

getSubdebt(string $unique_reference): Debt

getSubdebtByBarcode(string $barcode): Debt

getClientData(array $debts): Client