SEPA information and links

If you're working on a PHP/MySQL project with SEPA payments, here is a list of links with some very useful information that has helped me along the way.

The PHP side

https://github.com/dmitrirussu/php-sepa-xml-generator

Validating you SEPA XML files

http://www.mobilefish.com/services/sepa_xml_validation/sepa_xml_validation.php

Documentation about SEPA

bankofireland.com  sepa-direct-debit-pain-008-001-02-xml-file-structure-july-2013.pdf

https://sepa.bnpparibas.com/sepa/

Converting MSAccess to MySQL and making ready for SEPA

One of our clients has decided to move a large MSAccess database over to a MySQL solution.

There are tables with the clients profiles, addresses, subscriptions, orders and bank details.

The end result will also have to be capable of producing a XML file for the Single Euro Payments Area (SEPA) for the bank transfers.

Preparing for CakePHP

We've decided to use CakePHP 3.2 for a fast start to the new MCV program.

After exporting the the MSAccess tables using a great converting tool "Bullzip MS Access to MySQL" and then importing them into the MySQL database.

There was a lot of junk in some of the tables which had to be patched and cleaned. We renamed the tables, columns and modified the structures to respect the naming conventions of CakePHP before baking everything together.

The SEPA xml

We'll be using some cool PHP functions and a sepa_access_pain_008_001_02.xsl for the final formatting of our data to the SEPA standard.

$xp = new \XsltProcessor;
$xsl = new \DomDocument;
$xsl->load('sepa/sepa_access_pain_008_001_02.xsl'); //XSL file
$xp->importStylesheet($xsl);

$xml_doc = new \DomDocument;
$xml_doc->load("temp/$fileName.xml");

// transform $data into into XML using the XSL file
if ($data = $xp->transformToXML($xml_doc)) {
  file_put_contents("temp/$sepaFileName-$fileName.xml", $data, LOCK_EX);
} else {
  $this->Flash->error(__('XSL transformation failed'));
}
More soon...

Send us a message

Please indicate your name.
Please indicate a valid email address.