-
Notifications
You must be signed in to change notification settings - Fork 9
/
example.php
37 lines (31 loc) · 1.66 KB
/
example.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
<?php
require_once "lib.sepalastschrift.php";
$datum = new DateTime("now + 14 days");
$lastschriften = new SEPALastschrift($datum, /* msgid */ "randomid",
/* initiator */ "Example Org (user)",
/* account owner */ "FeM e.V.",
/* account IBAN */ "DE123IBAN",
/* account BIC */ "BICEXAMPLE0",
/* creditor ID */ "DE123456",
"EUR");
$lastschriften->addLastschrift( /* id */ "randomtxid",
/* iban */ "DE456IBAN",
/* bic */ "BICEXAMPLE1",
/* account owner */ "Test Me",
/* mandate */ "Mandate-Id123",
/* mandate signing date */ new DateTime("2013-05-23"),
/* amount */ 42.00,
/* subject */ "blabla SSS",
/* type */ "FRST");
$lastschriften->addLastschrift("randomtxid2", "DE789IBAN", "BICEXAMPLE2", "Test Me2", "Mandate-Id122", new DateTime("2013-05-22"), 44.00, "blabla SSS","RCUR");
$lastschriften->addLastschrift("randomtxid3", "DE012IBAN", "BICEXAMPLE3", "Test Me3", "Mandate-Id123", new DateTime("2013-05-22"), 44.00, "blabla SSS","RCUR");
# enable self-test: optional
global $sepaLastschriftXMLVersion; # 008.002.02
global $sepaLastschriftXSD; # ../media/
$sepaLastschriftXSD = dirname(__FILE__);
function add_message($msg, $class="hinweis") {
echo $msg."\n";
}
# output
header("Content-type: text/xml");
echo $lastschriften->asXML();