You can install the package via composer:
composer require appstract/laravel-twikey
Set the following values in your .env file:
TWIKEY_API_URL="<api url>"
TWIKEY_API_TOKEN="<your api token>"
Create an invitation:
$invite = Twikey::invite();
$invite->ct = 1234;
$invite->l = 'nl';
$invite->iban = 'GB33BUKB20201555555555';
$invite->bic = 'BUKBGB22';
$invite->email = 'test@example.com';
$invite->reminderDays = 14;
$invite->save();
var_dump($invite->toArray());
Find a mandate:
$mandate = Twikey::mandate()->find('ABC5');
var_dump($mandate->toArray());
Create a transaction:
$transaction = Twikey::transaction();
$transaction->mndtId = 'ABC5';
$transaction->message = 'Invoice 1234';
$transaction->amount = '84.32';
$transaction->save();
var_dump($transaction->toArray());
composer test
Contributions are welcome, thanks to y'all :)
Appstract is a small team from The Netherlands. We create (open source) tools for Web Developers and write about related subjects on Medium. You can follow us on Twitter, buy us a beer or support us on Patreon.
The MIT License (MIT). Please see License File for more information.