mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2025-08-13 11:25:36 +00:00
Bank Letter: Add English template & flexible generation
Allow for both German (de) and English (en) initialization letters. Signed-off-by: Herman van Hazendonk <github.com@herrie.org>
This commit is contained in:
@@ -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(() => {
|
||||
|
Reference in New Issue
Block a user