forked from dmitrirussu/php-sepa-xml-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
67 lines (57 loc) · 1.9 KB
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
require_once 'SepaXmlFile.php';
require_once 'SEPA/Factory/XmlGeneratorFactory.php';
$SEPAXml = new SEPAXmlFile();
$SEPAXml::$_XML_FILES_REPOSITORY = realpath(__DIR__) . '/xml_files/';
$SEPAXml::$_FILE_NAME = 'sepa_test.xml';
//Simple Example of Sepa Xml File Messages
$SEPAXml::$_MESSAGES = array(
array('message_id' => 1,
'group_header' => array(
'company_name' => 'Amazing SRL ȘȚțș ыаывпавпва '
),
'payment_info' => array(
'FRST' => array(
'id' => 6222,
'creditor_iban' => 'MD24 AG00 0225 1000 1310 4168',
'creditor_bic' => 'AABAFI42',
'creditor_name' => 'Amazing SRL',
'scheme_identifier' => 'FR07ZZZ519993',
'requested_collection_date' => '2013-08-06',
'transactions' => array(
SEPA\Factory\XmlGeneratorFactory::createXMLDirectDebitTransaction()
->setInstructionIdentification(3)
->setEndToEndIdentification(39)
->setInstructedAmount(100.5)
->setDebtorName('Roy SRL')
->setDebitIBAN('FR14 2004 1010 0505 0001 3M02 606')
->setDebitBIC('AABAFI22')
->setMandateIdentification('SDD000000016PFX0713')
->setDateOfSignature('2013-08-03')
//->setCurrency('EUR')
->setDirectDebitInvoice(122),
array(
'id' => 3,
'endId' => 3,
'company_name' => 'Toy SRL',
'amount' => 10.4,
'umr' => 'SDD000000016PFX0714',
'iban' => 'FR14 2004 1010 0505 0001 3M02 606',
'bic' => 'AABAFI42',
'mandate_sign_date' => '2013-08-03',
'invoice' => 1223
)
)
))));
//Sepa Export View
// $SEPAXml->export()->view();
//Sepa Export Save
// $SEPAXml->export()->save();
//Sepa Export Save and View
// $SEPAXml->export()->save()->view();
//Seepa Export View and Save
$SEPAXml->export()->view()->save();
// SEPA Xml export validation with ISO20022
//$SEPAXml->export()->validation('pain.008.001.02');
//SEPA xml export convert to array
//$SEPAXml->export()->convertToArray();