File: example.php

package info (click to toggle)
php-sepa-direct-debit 20131216-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 452 kB
  • ctags: 168
  • sloc: php: 500; sh: 263; makefile: 7
file content (30 lines) | stat: -rw-r--r-- 917 bytes parent folder | download
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
<?php
require_once("SEPASDD.php");
$config = array("name" => "Test",
                "IBAN" => "NL50BANK1234567890",
                "BIC" => "BANKNL2A",
                "batch" => true,
                "creditor_id" => "00000",
                "currency" => "EUR"
                );
                
$payment = array("name" => "Test von Testenstein",
                 "IBAN" => "NL50BANK1234567890",
                 "BIC" => "BANKNL2A",
                 "amount" => "1000",
                 "type" => "FRST",
                 "collection_date" => date("Y-m-d"),
                 "mandate_id" => "1234",
                 "mandate_date" => date("Y-m-d"),
                 "description" => "Test transaction"
                );                
try{
    $SEPASDD = new SEPASDD($config);
    $SEPASDD->addPayment($payment);
    print_r($SEPASDD->save());
}catch(Exception $e){
    echo $e->getMessage();
    exit;
}

?>