1. Go to this page and download the library: Download dlin/saasu 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/ */
$criteria = new BankAccountCriteria();
$criteria->isInbuilt = 'false';
$criteria->type = AccountType::Income;
$criteria->isActive = 'true';
//Return an array of matching Bank Accounts
$results = $api->searchEntities($criteria);
foreach($results as $bankAccount){
//do something with the $bankAccount entity
}
$criteria = new InvoicePaymentCriteria();
$criteria->transactionType= TransactionType::SalePayment;
$criteria->bankAccountUid = 23456;
$results = $this->api->searchEntities($criteria);
$result = reset($results);//get the first one;
echo $res->getExtra('amount');//prints 60
//file tests/Dlin/Saasu/Tests/Entity/TestBase.php
...
public function setUp()
{
//Please update with your testing account settings
$this->api = new SaasuAPI('D4A92597762C4FDCAF66FF03C988B7B0', '41509');
}
$invoice = new Invoice();
echo $invoice->validate(true)->hasError('uid'); //true for update
echo $invoice->validate()->hasError('uid'); //false for create
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.