You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
533 B
28 lines
533 B
|
6 years ago
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"encoding/xml"
|
||
|
|
"fmt"
|
||
|
|
"log"
|
||
|
|
"time"
|
||
|
|
|
||
|
|
"src.wolkict.net/sepa/pain"
|
||
|
|
)
|
||
|
|
|
||
|
|
func main() {
|
||
|
|
d := pain.NewDocument("PayPro B.V")
|
||
|
|
d.SetMeta(CREDITOR_NAME, CREDITOR_ADDR1, CREDITOR_ADDR2, CREDITOR_IBAN, CREDITOR_BIC, CREDITOR_ID,
|
||
|
|
time.Date(2020, time.January, 30, 12, 0, 0, 0, time.UTC), "RCUR")
|
||
|
|
err := d.Finalize("asdfasdf")
|
||
|
|
if err != nil {
|
||
|
|
log.Fatalf("finalizing failed: %v", err)
|
||
|
|
}
|
||
|
|
|
||
|
|
xml, err := xml.Marshal(d)
|
||
|
|
if err != nil {
|
||
|
|
log.Fatalf("marshaling failed: %v", err)
|
||
|
|
}
|
||
|
|
|
||
|
|
fmt.Printf("%v", string(xml))
|
||
|
|
}
|