From a774140612d22ffe2abd5a29029e115458ead156 Mon Sep 17 00:00:00 2001 From: "Vyacheslav N. Boyko" Date: Fri, 5 Aug 2022 13:23:04 +0300 Subject: [PATCH] notifications update --- async-api/site/index.html | 98 ++++++++++++++++++++++++++++++++--- async-api/waas-async-api.yaml | 16 ++++++ install-async-api.sh | 3 ++ 3 files changed, 110 insertions(+), 7 deletions(-) create mode 100755 install-async-api.sh diff --git a/async-api/site/index.html b/async-api/site/index.html index a15978f..82e1796 100644 --- a/async-api/site/index.html +++ b/async-api/site/index.html @@ -13,10 +13,69 @@
Profee WAAS Notificatioins API 1.0

The following notifications will be sent to partner system. Please provide us with URLs which will be responsible in every notification.

-

Operations

  • PUB card/authorization

    Accepts the following message:

    CardOperationNotificationDto
    object

Messages

  • #1CardOperationNotificationDto
    object
+

Additional properties are allowed.

diff --git a/async-api/waas-async-api.yaml b/async-api/waas-async-api.yaml index d775bfa..19a07e0 100644 --- a/async-api/waas-async-api.yaml +++ b/async-api/waas-async-api.yaml @@ -8,6 +8,21 @@ channels: publish: message: $ref: '#/components/messages/CardOperationNotificationDto' + description: | + WaaS partners receive notifications upon any attempt to make a card operation. + These notifications are supposed to inform the customer on the operation status and the remaining balance, or they can state the reason for denial. + These notifications have to be sent by the partner. + The partner may choose an appropriate way to convey this information, be it an SMS or a push notification. + Our service provides the parameters of the message, but not the message itself, so the partners may create their own customized templates. + + A partner may structure the messages according to the following templates: + + |Notification type|Conditions for the notification|Notification structure| + |-----------------|-------------------------------|----------------------| + |Load money |status = 2, type/code = 1 |Card [$cardId] has been loaded [$merchant/amount] [$merchant/currency] [$merchantName]. Balance [$otb] [$card/currency]. [$authDate] [$authTime] | + |Purchase |status = 2, type/code = 0 |Card [$cardId]. Purchase [$merchant/amount] [$merchant/currency] [$merchantName]. Balance [$otb] [$card/currency]. [$authDate] [$authTime] | + |Denial of operation |status = 0, type/code IN {0,1} |Card [$cardId]. Transaction [$merchant/amount] [$merchant/currency] refused by Card Issuer at [$merchantName]. [$authDate] [$authTime] | + |Cancellation of payments for goods and services |status = 1, type/code = 3 |Card [$cardId]. Transaction cancelled [$merchant/amount] [$merchant/currency] [$merchantName]. Balance [$otb] [$card/currency]. [$authDate] [$authTime] | components: messages: CardOperationNotificationDto: @@ -54,6 +69,7 @@ components: type: string format: time description: Authorization time for the operation + example: '18:30:15' postingDate: type: string description: Posting date for the operation diff --git a/install-async-api.sh b/install-async-api.sh new file mode 100755 index 0000000..c6087da --- /dev/null +++ b/install-async-api.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +npm install @asyncapi/generator@1.9.5 \ No newline at end of file