Message provider configuration

Message formats

The message provider creates the transaction approval message from a message template, values from the transaction approval parameter step, and the context data of the user. 

  • The graphic below shows where the message template comes from:
  • For each message provider, a message translation key can be configured.
  • The message translation key can also contain variables (of the form ${...}) that are replaced by values from the transaction approval parameter step or the user's context data.
Airlock2FAMessageProvider

In the example graphic, the variable is ${type} and is replaced by the value payment from the parameter step. Therefore the message template is taken from the string resource file under the key mtan.payment.message.

Message template example with limited message length:

Approve payment:
${amount} ${currency} to account number ${accountNumber,mid,3,2}.

Default transaction string resources can be customized and localized for specific or common use in the directory ./instances/common/transaction-approval-texts/.

See also Customizing text elements in the Transaction Approval module.

Limit message length

Variables used in the message template can also contain special syntax to limit the message length i.e. to shorten a message if it exceeds its maximum allowed length.

Syntax

Meaning

Example

${X}

The variable needs to be displayed in full and can not be abbreviated.

Input: ${X} with X="1234567890"
Result: 1234567890
${X,left,minSize}

Always displays at least minSize letters but may abbreviate the string on the RIGHT side if not enough space is available.

Input: ${X,left,3} with X="1234567890"
Result: 123..
${X,right,minSize}

Always displays at least minSize letters but may abbreviate the string on the LEFT side if not enough space is available.

Input: ${X,right,3} with X="1234567890"
Result: ..890
${X,mid,minSizeLeft,minSizeRight}

Always displays at least minSizeLeft and minSizeRight letters from the left and right side of the text but may abbreviate the string in the MIDDLE if not enough space is available.

Input: ${X,mid,3,2} with X="1234567890"
Result: 123..90

Message provider plugins may support specific additional variables. The ${TOKEN}, for example, is used in the mTAN message provider to display the involved OTP code.

If the overall message size still exceeds the configured maximally allowed length after shortening the variables, the transaction approval parameters REST call will fail and no message is sent.