PHP code example of booosta / std_camt
1. Go to this page and download the library: Download booosta/std_camt 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/ */
booosta / std_camt example snippets
# [...]
$camt = $this->makeInstance('std_camt', $xml_file);
$transactions = $camt->getTransactions();
foreach($transactions as $transaction) {
print PHP_EOL . 'record_id: ' . $transaction['record_id'];
print PHP_EOL . 'transaction_id: ' . $transaction['transaction_id'];
print PHP_EOL . 'date: ' . $transaction['date'];
print PHP_EOL . 'datetime: ' . $transaction['datetime'];
print PHP_EOL . 'timezone: ' . $transaction['timezone'];
print PHP_EOL . 'amount: ' . $transaction['amount'];
print PHP_EOL . 'amount_cent: ' . $transaction['amount_cent'];
print PHP_EOL . 'currency: ' . $transaction['currency'];
print PHP_EOL . 'message: ' . $transaction['message'];
print PHP_EOL . 'is_credit: ' . $transaction['is_credit']; // is it a credit (true) or debit (false) booking?
print PHP_EOL . 'creditor_name: ' . $transaction['creditor_name'];
print PHP_EOL . 'creditor_address: ' . $transaction['creditor_address'];
print PHP_EOL . 'creditor_country: ' . $transaction['creditor_country'];
print PHP_EOL . 'creditor_iban: ' . $transaction['creditor_iban'];
print PHP_EOL . 'debtor_name: ' . $transaction['debtor_name'];
print PHP_EOL . 'debtor_address: ' . $transaction['debtor_address'];
print PHP_EOL . 'debtor_country: ' . $transaction['debtor_country'];
print PHP_EOL . 'debtor_iban: ' . $transaction['debtor_iban'];
print PHP_EOL;
}
$camt = new \booosta\std_camt\Std_camt($xml_file);