2017 © Pedro PelĂĄez
 

library sepa-xml

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer. Altered the original for compatibility with portuguese standards

image

bolovsky/sepa-xml

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer. Altered the original for compatibility with portuguese standards

  • Wednesday, January 22, 2014
  • by bolovsky
  • Repository
  • 4 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 65 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

php-sepa-xml

Master: Build Status, (*1)

SEPA file generator for PHP., (*2)

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer and Direct Debit., (*3)

License: GNU Lesser General Public License v3.0, (*4)

The version of the standard followed is: pain.001.001.03 and pain.008.001.02, (*5)

Institutions and associations that should accept this format: * Banco de Portugal, (*6)

However, always verify generated files with your bank before using!, (*7)

Installation

Composer

This library is available in packagist.org, you can add it to your project via Composer., (*8)

In the "require" section of your composer.json file:, (*9)

Always up to date (bleeding edge, API not guaranteed stable), (*10)

"bolovsky/sepa-xml" : "dev-master"

No namespaces, only bugfixes, (*11)

"digitick/sepa-xml" : "dev-no_namespace"

Sample Usage DirectDebit with Factory

//Set the initial information
$directDebit = TransferFileFacadeFactory::createDirectDebit('test123', 'Me');

// create a payment, it's possible to create multiple payments,
// "firstPayment" is the identifier for the transactions
$directDebit->addPaymentInfo('firstPayment', array(
    'id'                    => 'firstPayment',
    'creditorName'          => 'My Company',
    'creditorAccountIBAN'   => 'FI1350001540000056',
    'creditorAgentBIC'      => 'PSSTFRPPMON',
    'seqType'               => PaymentInformation::S_ONEOFF,
    'creditorId'            => 'DE21WVM1234567890'
));
// Add a Single Transaction to the named payment
$directDebit->addTransfer('firstPayment', array(
    'amount'                => '500',
    'debtorIban'            => 'FI1350001540000056',
    'debtorBic'             => 'OKOYFIHH',
    'debtorName'            => 'Their Company',
    'debtorMandate'         =>  'AB12345',
    'debtorMandateSignDate' => '13.10.2012',
    'remittanceInformation' => 'Purpose of this direct debit'
));
// Retrieve the resulting XML
$directDebit->asXML();

Extended Usage Credit Transfer

// Create the initiating information
$groupHeader = new GroupHeader('SEPA File Identifier', 'Your Company Name');

// Some portuguese banks require Fiscal Identification Number as Id
$groupHeader->setInitiatingPartyId("123456789");

$sepaFile = new CustomerCreditTransferFile($groupHeader);

$transfer = new CustomerCreditTransferInformation(
    '0.02', // Amount
    'FI1350001540000056', //IBAN of creditor
    'Their Corp' //Name of Creditor
    );
$transfer->setBic('OKOYFIHH'); // Set the BIC explicitly
$transfer->setRemittanceInformation('Transaction Description');
$sepa_transfer->setCode("SCOR"); // transaction code for this specific transfer, according to annex 5 (ISO codes billing/transfer reasons)
$sepa_transfer->setReference("INV20140101A-033"); // reference number to descript this transaction, i.e. an invoice

// Create a PaymentInformation the Transfer belongs to
$payment = new PaymentInformation(
    'Payment Info ID',
    'FR1420041010050500013M02606', // IBAN the money is transferred from
    'PSSTFRPPMON',  // BIC
    'My Corp' // Debitor Name
    );
// It's possible to add multiple Transfers in one Payment
$payment->addTransfer($transfer);

// It's possible to add multiple payments to one SEPA File
$sepaFile->addPaymentInformation($payment);

// Attach a dombuilder to the sepaFile to create the XML output
$domBuilder = DomBuilderFactory::createDomBuilder($sepaFile);

$domBuilder->asXml();

The Versions

22/01 2014

dev-master

9999999-dev

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer. Altered the original for compatibility with portuguese standards

  Sources   Download

GNU Lesser General Public License v3.0

The Requires

  • php >=5.3.2

 

by Ricardo Lopes
by Digitick, SA
by Ianaré Sévi
by Luis Soares

xml sepa banking

19/12 2013

0.10.1

0.10.1.0

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.

  Sources   Download

GNU Lesser General Public License v3.0

The Requires

  • php >=5.3.2

 

by Digitick, SA
by Ianaré Sévi

xml sepa banking

24/10 2013

0.10.0

0.10.0.0

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.

  Sources   Download

GNU Lesser General Public License v3.0

The Requires

  • php >=5.3.2

 

by Digitick, SA
by Ianaré Sévi

xml sepa banking

18/09 2013

dev-no_namespace

dev-no_namespace

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.

  Sources   Download

GNU Lesser General Public License v3.0

The Requires

  • php >=5.3.2

 

by Digitick, SA
by Ianaré Sévi

xml sepa banking

05/09 2013

0.9.3

0.9.3.0

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.

  Sources   Download

GNU Lesser General Public License v3.0

The Requires

  • php >=5.3.2

 

by Digitick, SA
by Ianaré Sévi

xml sepa banking

05/09 2013

0.9.2

0.9.2.0

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.

  Sources   Download

GNU Lesser General Public License v3.0

The Requires

  • php >=5.3.2

 

by Digitick, SA
by Ianaré Sévi

xml sepa banking

12/07 2013

0.9.1

0.9.1.0

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.

  Sources   Download

GNU Lesser General Public License v3.0

The Requires

  • php >=5.3.2

 

by Digitick, SA
by Ianaré Sévi

xml sepa banking