PHP code example of jongotlin / paxml

1. Go to this page and download the library: Download jongotlin/paxml 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/ */

    

jongotlin / paxml example snippets


$paxmlGenerator = new PaxmlGenerator();
$paxml = new Paxml();
$header = new Header();
$paxml->setHeader($header);
$salaryTransaction = new SalaryTransaction('1', '1122334455', '123', 1.2);
$salaryTransaction->setUnitPrice(1000);
$paxml->addSalaryTransaction($salaryTransaction);

$config = new PaxmlConfig();
$config->setAnstIdPrefix('LL');

$paxmlDocument = $paxmlGenerator->createPaxmlDocument($paxml, $config);
echo $paxmlDocument->saveXML();