diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..79da927 --- /dev/null +++ b/src/index.html @@ -0,0 +1,120 @@ + + + + + + + UPN-QR | Open generator for UPN QR codes + + + +
+

About

+

+ This API was developed for personal use, but modified and later released for public use. + It is an unofficial application with the sole purpose of simplifying QR code generation for universal payment ordes (https://upn-qr.si). + The application does not keep any long-term logs. +

+
+
+

Terms of usage

+

Because upn-qr.si prohobits the generation and use of UPN-QR codes by any unapthorized party, you must be authorized in order to use this application and publish the content that it generates.

+
+
+

API

+

1. /api/qrcode

+

Following the specification from official documentation - NavodilaZaProgramerjeUPNQR.pdf, section 4. - "Vsebina kode QR"

+
+ +
+ Query parameters: +
payer_name
+
+ Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i +
+ Demo: regex101.com/r/t9EaM3/1 +
+ +
payer_address
+
+ Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i +
+ Demo: regex101.com/r/JA4wmM/1 +
+ +
payer_city
+
+ Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i +
+ Demo: regex101.com/r/5QMpTn/1 +
+ +
payer_amount
+
+ Regex: ^(?=.{11}$)[0]{1,11}[1-9]{0,11}$ +
+ Demo: regex101.com/r/kbIqwu/1 +
+ +
purpose_code
+
+ Regex: ^[A-Z]{4}$ +
+ Demo: regex101.com/r/TsiZQJ/1 +
+ Default: OTHR +
+ +
payment_purpose
+
+ Regex: ^[A-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,40}[A-Z0-9ČŠŽĐ])?$ +
+ Demo: regex101.com/r/y7kUXP/1 +
+ +
iban
+
+ Regex: ^[A-Z]{2}\d{17}$ +
+ Demo: regex101.com/r/8bXDvh/1 +
+ +
reference
+
+ Regex: ^[A-Z]{2}[0-9\-]{1,24}$ +
+ Demo: regex101.com/r/2tSYMw/1 +
+ +
issuer_name
+
+ Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i +
+ Demo: regex101.com/r/DFjB0D/1 +
+ +
issuer_address
+
+ Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i +
+ Demo: regex101.com/r/5oKk0T/1 +
+ +
issuer_city
+
+ Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i +
+ Demo: regex101.com/r/JfuNU1/1 +
+ + +
+ +
+ + \ No newline at end of file diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..d6ff8da --- /dev/null +++ b/src/style.css @@ -0,0 +1,51 @@ +body, +html { + margin: 0; + padding: 0; + max-width: 100vw; + overflow-x: hidden; + --c-dark: #202124; + --c-darkish: #303134; + --c-primary: #e8eaed; + --c-accent: #C58AF9; +} + +html { + padding: 0 0; + width: 100vw; + display: grid; + grid-template-columns: auto minmax(50vw, 550px) auto; + background-color: var(--c-dark); +} + +body { + grid-column: 2; + padding: 15px; + margin: 30px 10px; + + display: grid; + grid-template-columns: auto; + grid-auto-rows: auto; + row-gap: 2rem; + + border-radius: 1rem; + background-color: var(--c-darkish); + color: var(--c-primary); + + font-family: monospace; + font-size: 16px; + line-height: 1.6em; +} + +a { + color: var(--c-accent); + text-decoration: none; +} +code { + background-color: var(--c-dark); + padding: 6px 4px 2px 4px; + word-break: break-all; +} +section div { + padding-left: 25px; +} \ No newline at end of file