Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
132abcfd2d |
9
GENERATED_ipng.go
Normal file
9
GENERATED_ipng.go
Normal file
File diff suppressed because one or more lines are too long
@@ -46,11 +46,11 @@ func qrchFromRequest(r *http.Request) *qrbill.QRCH {
|
||||
IBAN: ifEmpty(r.Form, "criban", "CH0209000000870913543"),
|
||||
Cdtr: qrbill.Address{
|
||||
AdrTp: qrbill.AddressType(ifEmpty(r.Form, "craddrtype", string(qrbill.AddressTypeStructured))),
|
||||
Name: ifEmpty(r.Form, "crname", "Legalize it"),
|
||||
StrtNmOrAdrLine1: ifEmpty(r.Form, "craddr1", "Quellenstrasse"),
|
||||
BldgNbOrAdrLine2: ifEmpty(r.Form, "craddr2", "25"),
|
||||
PstCd: ifEmpty(r.Form, "crpost", "8005"),
|
||||
TwnNm: ifEmpty(r.Form, "crcity", "Zürich"),
|
||||
Name: ifEmpty(r.Form, "crname", "IPng Networks GmbH"),
|
||||
StrtNmOrAdrLine1: ifEmpty(r.Form, "craddr1", "Im Bungert"),
|
||||
BldgNbOrAdrLine2: ifEmpty(r.Form, "craddr2", "14"),
|
||||
PstCd: ifEmpty(r.Form, "crpost", "8306"),
|
||||
TwnNm: ifEmpty(r.Form, "crcity", "Brüttisellen"),
|
||||
Ctry: ifEmpty(r.Form, "crcountry", "CH"),
|
||||
},
|
||||
},
|
||||
@@ -60,18 +60,18 @@ func qrchFromRequest(r *http.Request) *qrbill.QRCH {
|
||||
},
|
||||
UltmtDbtr: qrbill.Address{
|
||||
AdrTp: qrbill.AddressType(ifEmpty(r.Form, "udaddrtype", string(qrbill.AddressTypeStructured))),
|
||||
Name: ifEmpty(r.Form, "udname", "Michael Stapelberg"),
|
||||
StrtNmOrAdrLine1: ifEmpty(r.Form, "udaddr1", "Stauffacherstr"),
|
||||
BldgNbOrAdrLine2: ifEmpty(r.Form, "udaddr2", "42"),
|
||||
PstCd: ifEmpty(r.Form, "udpost", "8004"),
|
||||
TwnNm: ifEmpty(r.Form, "udcity", "Zürich"),
|
||||
Name: ifEmpty(r.Form, "udname", "IPng Networks GmbH"),
|
||||
StrtNmOrAdrLine1: ifEmpty(r.Form, "udaddr1", "Im Bungert"),
|
||||
BldgNbOrAdrLine2: ifEmpty(r.Form, "udaddr2", "14"),
|
||||
PstCd: ifEmpty(r.Form, "udpost", "8306"),
|
||||
TwnNm: ifEmpty(r.Form, "udcity", "Brüttisellen"),
|
||||
Ctry: ifEmpty(r.Form, "udcountry", "CH"),
|
||||
},
|
||||
RmtInf: qrbill.QRCHRmtInf{
|
||||
Tp: "NON", // Reference type
|
||||
Ref: "", // Reference
|
||||
AddInf: qrbill.QRCHRmtInfAddInf{
|
||||
Ustrd: ifEmpty(r.Form, "message", "Spende 420"),
|
||||
Ustrd: ifEmpty(r.Form, "message", "IPng Networks GmbH invoice"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
57
logo.svg
Normal file
57
logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 8.2 KiB |
@@ -318,8 +318,8 @@ func (b *Bill) EncodeToSVG() ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// overlay the swiss cross
|
||||
cross := swisscross["swisscross.svg"]
|
||||
// overlay the IPng Logo
|
||||
cross := ipng["logo.svg"]
|
||||
// Remove XML document header, we embed the <svg> element:
|
||||
cross = bytes.ReplaceAll(cross, []byte(`<?xml version="1.0" encoding="utf-8"?>`), nil)
|
||||
// Overwrite position and size of the embedded <svg> element:
|
||||
|
||||
@@ -78,7 +78,7 @@ func generateQrCodeImage(payload string) (image.Image, error) {
|
||||
}
|
||||
|
||||
func overlayWithSwissCross(qrCodeImage image.Image) (image.Image, error) {
|
||||
b := swisscross["third_party/swiss-cross/CH-Kreuz_7mm/CH-Kreuz_7mm.png"]
|
||||
b := ipng["logo-inverted.png"]
|
||||
swissCrossImage, _, err := image.Decode(bytes.NewReader(b))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user