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.

27 lines
557 B

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)
}
xmlBytes, err := xml.Marshal(d)
if err != nil {
log.Fatalf("marshaling failed: %v", err)
}
fmt.Printf("%v%v", xml.Header, string(xmlBytes))
}