mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2025-08-13 11:25:36 +00:00
Merge pull request #24 from Herrie82/herrie/english
feat: Add English template & flexible generation
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