wultra / enrollment-server

Base implementation of the enrollment server, usable as the stub for project bootstrapping.
GNU Affero General Public License v3.0
4 stars 1 forks source link

Add optional texts to the operation template for - success - failure - reject #1077

Closed banterCZ closed 2 months ago

banterCZ commented 2 months ago

Add optional texts to the operation template for

The Operation ui object could be extended to contain something like texts or more specifically resultTexts with all texts optional (for customers to be able to configure only the success text for example).

Maybe the text should be part of the operation (in the formData where title and message is) as this is not "what the operation looks like" but more of the "what the operation is and shows".

When the text is missing in the template, default from the app will be used.

banterCZ commented 2 months ago

The format should be for example

{
  "formData": {
    "title": "Confirm Payment",
    "message": "Hello,\nplease confirm following payment:",
    "resultTexts": {
      "success": "Payment of ${amount} ${currency} was confirmed",
      "reject": "Payment was rejected",
      "failure": "Payment approval failed"
    },
    "attributes": [
      {
        "type": "HEADING",
        "id": "operation.heading",
        "label": "Utility Payment"
      }
    ]
  }
}