diff --git a/examples/bankLetter.js b/examples/bankLetter.js index 543cee8..5ac84b1 100755 --- a/examples/bankLetter.js +++ b/examples/bankLetter.js @@ -16,10 +16,11 @@ const client = new ebics.Client({ keyStorage: ebics.fsKeysStorage('./keys-test'), }); -const bankName = 'Bank name'; -const template = fs.readFileSync('./templates/ini.hbs').toString(); +const bankName = 'Bank name'; // Change this to the bank name you're going to send the letter to. +const languageCode = 'en'; // Currently 'de' and 'en' are valid values. +const template = fs.readFileSync('../templates/ini_'+languageCode+'.hbs').toString(); const letter = new ebics.BankLetter({ client, bankName, template }); -const bankLetterFile = path.join(os.homedir(), 'bankLetter.html'); +const bankLetterFile = path.join(os.homedir(), 'bankLetter_'+languageCode+'.html'); letter.serialize(bankLetterFile) .then(() => { diff --git a/templates/ini.hbs b/templates/ini_de.hbs similarity index 100% rename from templates/ini.hbs rename to templates/ini_de.hbs diff --git a/templates/ini_en.hbs b/templates/ini_en.hbs new file mode 100644 index 0000000..cda3ec0 --- /dev/null +++ b/templates/ini_en.hbs @@ -0,0 +1,164 @@ + + + +
+ + +Date | +{{ today }} | +
Time | +{{ now }} | +
Recipient | +{{ bankName }} | +
User ID | +{{ userId }} | +
Customer ID | +{{ partnerId }} | +
Public authentication key (A006)
+Exponent ({{ keyExponentBits A006 }} Bit):
+
+ {{ keyExponent A006 }}
+
Modulus ({{ keyModulusBits A006 }} Bit):
+
+ {{ keyModulus A006 }}
+
SHA-256 Hash:
+
+ {{ sha256 A006 }}
+
I hereby confirm the above public key for my electronic signature.
+_________________________ | +_________________________ | +_________________________ | +
City/Date | +Name/Company | +Signature | +
Date | +{{ today }} | +
Time | +{{ now }} | +
Recipient | +{{ bankName }} | +
User ID | +{{ userId }} | +
Customer ID | +{{ partnerId }} | +
Public Identification Key (X002)
+Exponent ({{ keyExponentBits X002 }} Bit):
+
+ {{ keyExponent X002 }}
+
Modulus ({{ keyModulusBits X002 }} Bit):
+
+ {{ keyModulus X002 }}
+
SHA-256 Hash:
+
+ {{ sha256 X002 }}
+
Continuation on Page 2 ...
+ +Date | +{{ today }} | +
Time | +{{ now }} | +
Recipient | +{{ bankName }} | +
User ID | +{{ userId }} | +
Customer ID | +{{ partnerId }} | +
Public Encryption Key (E002)
+Exponent ({{ keyExponentBits E002 }} Bit):
+
+ {{ keyExponent E002 }}
+
Modulus ({{ keyModulusBits E002 }} Bit):
+
+ {{ keyModulus E002 }}
+
SHA-256 Hash:
+
+ {{ sha256 E002 }}
+
I hereby confirm the above public keys for my EBICS access.
+_________________________ | +_________________________ | +_________________________ | +
City/Date | +Name/Company | +Signature | +