PHP code example of karlsen-technologies / gocardless-php
1. Go to this page and download the library: Download karlsen-technologies/gocardless-php 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/ */
karlsen-technologies / gocardless-php example snippets
use KarlsenTechnologies\GoCardless\DataObjects\Api\Credentials;
use KarlsenTechnologies\GoCardless\Client;
$credentials = new Credentials('secret_id', 'secret_key');
$client = new Client($credentials);
use KarlsenTechnologies\GoCardless\Client;
$client = new Client(...);
$client->getInstitutions();
$client->getInstitutions('COUNTRY');
$client->getInstitution('INSTITUTION_ID');
$client->getAgreements(); // Default limit of 100, offset of 0
$client->getAgreements(100, 10); // Limit of 100, offset of 10
$client->getAgreement('AGREEMENT_ID');
$client->createAgreement('INSTIUTION_ID', 90, 90, ['SCOPES']);
$client->deleteAgreement('AGREEMENT_ID');
$client->acceptAgreement('AGREEMENT_ID', 'GoCardless-PHP', '127.0.0.1');
$client->getRequisitions(); // Default limit of 100, offset of 0
$client->getRequisitions(100, 10); // Limit of 100, offset of 10
$client->getRequisition('REQUISITION_ID');
$client->createRequisition('http://localhost', 'INSTIUTION_ID', 'AGREEMENT_ID', 'REFRENCE', 'LANGUAGE', 'SSN', true, true);
$client->deleteRequisition('REQUISITION_ID');
$client->getAccount('ACCOUNT_ID');
$client->getAccountBalances('ACCOUNT_ID');
$client->getAccountDetails('ACCOUNT_ID');
$client->getAccountTransactions('ACCOUNT_ID', 'FROM_DATE', 'TO_DATE');
use KarlsenTechnologies\GoCardless\DataObjects\Api\Tokens;
$client = new Client(...);
$tokens = $client->getTokens();
$newTokens = new Tokens('access_token', 3600, 'refresh_token', 86400);
$client->setTokens($newTokens);
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.