PHP code example of secupay / camt-parser
1. Go to this page and download the library: Download secupay/camt-parser 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/ */
secupay / camt-parser example snippets
// before:
$amount = $entry->getAmountDetails()->getAmount();
// now:
$amount = $entry->getAmountDetails()->getTransactionAmount()->getAmount();
use Genkgo\Camt\Config;
use Genkgo\Camt\Reader;
$reader = new Reader(Config::getDefault());
$message = $reader->readFile('test/data/camt053.v2.minimal.xml');
$statements = $message->getRecords();
foreach ($statements as $statement) {
$entries = $statement->getEntries();
}
use Genkgo\Camt\Config;
use Genkgo\Camt\Reader;
$config = Config::getDefault();
$config->disableXsdValidation();
$reader = new Reader($config);