Download the PHP package byrokrat/autogiro without Composer
On this page you can find all versions of the php package byrokrat/autogiro. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download byrokrat/autogiro
More information about byrokrat/autogiro
Files in byrokrat/autogiro
Package autogiro
Short Description Read and write files for the swedish direct debit system autogirot
License GPL-3.0-or-later
Homepage https://github.com/byrokrat/autogiro
Informations about the package autogiro
Autogiro
Read and write files for the swedish direct debit system autogirot.
For a command line utility that can convert autogiro files to XML see
autogiro2xml
.
Installation
Table of contents
- Autogiro specifications
- Generating autogiro request files
- Parsing autogiro files
- Accessing nodes using visitors
- Generating XML from node trees
- Hacking
Autogiro specifications
This library is developed against the technichal manual (in swedish) of the direct debit system (autogirot) revised 2016-12-13. For later versions of this document see Bankgirocentralen.
Generating autogiro request files
Create a writer by supplying your bankgiro account number and
BGC customer number to WriterFactory
.
Perform actions on the writer and generate file.
Will output something like:
Parsing autogiro files
Create a parser using the ParserFactory
.
The created parser will by default parse and validate monetary amounts, account numbers and identification numbers. Opt out of this functionality by using one of the visitor constants:
Parsing a file creates a node object.
Accessing special objects
Account
, Amount
, StateId
and Date
nodes are nested structures, where child
node Object
contains constructed php objects. Access using something like:
Walking the parse tree
A simpler way of doing this is by using visitors. See below.
Walk the tree by calling hasChild()
, getChild()
and getChildren()
.
Or access all Node::DELETE_MANDATE_REQUEST
nodes.
Trying to access a child that does not exist returns a NullNode
.
Accessing nodes using visitors
With the use of visitors nodes can be accessed based on name or type.
This can also be done dynamically.
Finding mandate responses
Finding payment responses
Generating XML from node trees
Using this feature can be very helpful to understand how the parser interprets various layouts.
Hacking
With composer installed as composer
Or use something like
All versions of autogiro with dependencies
ext-mbstring Version *
ext-bcmath Version *
byrokrat/banking Version ^2.1
byrokrat/id Version ^2
moneyphp/money Version ^3
neitanod/forceutf8 Version ~2.0