PHP code example of appstract / twikey-php-client

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

    

appstract / twikey-php-client example snippets



$invite = $twikey::invite();

$invite->ct = 1234;
$invite->l = 'nl';
$invite->iban = 'GB33BUKB20201555555555';
$invite->bic = 'BUKBGB22';
$invite->email = '[email protected]';
$invite->reminderDays = 14;

$invite->save();

var_dump($invite->toArray());



$mandate = $twikey::mandate()->find('ABC5');

var_dump($mandate->toArray());



$transaction = $twikey::transaction();
$transaction->mndtId = 'ABC5';
$transaction->message = 'Invoice 1234';
$transaction->amount = '84.32';

$transaction->save();

var_dump($transaction->toArray());

 bash
composer