PHP code example of appstract / laravel-twikey

1. Go to this page and download the library: Download appstract/laravel-twikey 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 / laravel-twikey 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());