Merge pull request #1 from profee-waas/feature/PROF-16796/callbacks-about-cards-notifications
Callbacks about cards notificationsmaster
commit
ed41e3a5f5
|
@ -1,5 +1,8 @@
|
||||||
|
.idea
|
||||||
/.idea/.gitignore
|
/.idea/.gitignore
|
||||||
/.idea/misc.xml
|
/.idea/misc.xml
|
||||||
/.idea/modules.xml
|
/.idea/modules.xml
|
||||||
/.idea/pf-waas-api.iml
|
/.idea/pf-waas-api.iml
|
||||||
/.idea/vcs.xml
|
/.idea/vcs.xml
|
||||||
|
**.**~
|
||||||
|
**.iml
|
||||||
|
|
22
README.md
22
README.md
|
@ -1 +1,23 @@
|
||||||
# pf-waas-api
|
# pf-waas-api
|
||||||
|
|
||||||
|
## Обновление Async API
|
||||||
|
|
||||||
|
### Предварительно установить библиотеку
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
npm install -g @asyncapi/html-template@0.16.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Запустить пересборку HTML вручную
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
cd async-api/site/
|
||||||
|
ag ../waas-async-api.yaml @asyncapi/html-template
|
||||||
|
```
|
||||||
|
NB! Перед тем, как запускать генерацию HTML нужно закоммитить все изменения в git.
|
||||||
|
И следовать всем инструкциям.
|
||||||
|
|
||||||
|
### Пересборка оформлена в виде скрипта (linux only)
|
||||||
|
|
||||||
|
> update-async-api.sh
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
html{-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,77 @@
|
||||||
|
asyncapi: 2.3.0
|
||||||
|
info:
|
||||||
|
title: Profee WAAS Notificatioins API
|
||||||
|
version: '1.0'
|
||||||
|
description: The following notifications will be sent to partner system. Please provide us with URLs which will be responsible in every notification.
|
||||||
|
channels:
|
||||||
|
card/authorization:
|
||||||
|
publish:
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/CardOperationNotificationDto'
|
||||||
|
components:
|
||||||
|
messages:
|
||||||
|
CardOperationNotificationDto:
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
cardId:
|
||||||
|
type: string
|
||||||
|
description: Card ID
|
||||||
|
walletId:
|
||||||
|
type: string
|
||||||
|
description: Wallet ID
|
||||||
|
notification:
|
||||||
|
type: object
|
||||||
|
description: Notification about card operation authorization
|
||||||
|
properties:
|
||||||
|
uuid:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
direction:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
mcc:
|
||||||
|
type: number
|
||||||
|
authDate:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
authTyme:
|
||||||
|
type: string
|
||||||
|
format: time
|
||||||
|
postingDate:
|
||||||
|
type: string
|
||||||
|
authCode:
|
||||||
|
type: string
|
||||||
|
rrn:
|
||||||
|
type: number
|
||||||
|
merchantId:
|
||||||
|
type: number
|
||||||
|
terminalId:
|
||||||
|
type: number
|
||||||
|
merchantName:
|
||||||
|
type: string
|
||||||
|
merchantCity:
|
||||||
|
type: string
|
||||||
|
merchantSum:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
currency:
|
||||||
|
type: string
|
||||||
|
cardSum:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
currency:
|
||||||
|
type: string
|
||||||
|
authDescription:
|
||||||
|
type: string
|
|
@ -29,7 +29,7 @@
|
||||||
initRedoc();
|
initRedoc();
|
||||||
}
|
}
|
||||||
|
|
||||||
var api_url = 'https://profee-waas.github.io/pf-waas-api/waas-api.json';
|
var api_url = 'https://profee-waas.github.io/pf-waas-api/api/waas-api.json';
|
||||||
|
|
||||||
function initRedoc() {
|
function initRedoc() {
|
||||||
const ui = SwaggerUIBundle({
|
const ui = SwaggerUIBundle({
|
||||||
|
|
54
index.html
54
index.html
|
@ -1,11 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>ReDoc</title>
|
<title>ProFee WAAS API</title>
|
||||||
<!-- needed for adaptive design -->
|
<!-- needed for adaptive design -->
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
ReDoc doesn't change outer page styles
|
ReDoc doesn't change outer page styles
|
||||||
|
@ -18,22 +19,51 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<redoc spec-url=''></redoc>
|
|
||||||
|
<div class="tabs is-large">
|
||||||
|
<ul>
|
||||||
|
<li id="page-api" class="is-active" onclick="showApi();"><a>API</a></li>
|
||||||
|
<li id="page-async-api" onclick="showAsyncApi();"><a>Async API</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="api">
|
||||||
|
<redoc spec-url=''></redoc>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="async-api">
|
||||||
|
<iframe src="async-api/site/index.html" width="100%" height="1000" seamless="yes"></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
|
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
if (document.readyState == 'loading') {
|
if (document.readyState == 'loading') {
|
||||||
document.addEventListener("DOMContentLoaded", () => initRedoc());
|
document.addEventListener("DOMContentLoaded", () => initRedoc());
|
||||||
} else {
|
} else {
|
||||||
initRedoc();
|
initRedoc();
|
||||||
}
|
}
|
||||||
|
|
||||||
var isLocalhost = location.hostname === "localhost" || location.hostname === "127.0.0.1";
|
var isLocalhost = location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.protocol === 'file:';
|
||||||
var api_url = isLocalhost ? '/waas-api.json' : 'https://profee-waas.github.io/pf-waas-api/waas-api.json';
|
var api_url = isLocalhost ? '/api/waas-api.json' : 'https://profee-waas.github.io/pf-waas-api/api/waas-api.json';
|
||||||
|
|
||||||
function initRedoc() {
|
function initRedoc() {
|
||||||
Redoc.init(api_url, {"pathInMiddlePanel":true});
|
Redoc.init(api_url, {"pathInMiddlePanel":true});
|
||||||
}
|
showApi();
|
||||||
|
}
|
||||||
|
function showApi() {
|
||||||
|
document.getElementById("page-api").classList.add("is-active");
|
||||||
|
document.getElementById("page-async-api").classList.remove("is-active");
|
||||||
|
document.getElementById("async-api").style.display = "none";
|
||||||
|
document.getElementById("api").style.display = "block";
|
||||||
|
}
|
||||||
|
function showAsyncApi() {
|
||||||
|
document.getElementById("page-async-api").classList.add("is-active");
|
||||||
|
document.getElementById("page-api").classList.remove("is-active");
|
||||||
|
document.getElementById("api").style.display = "none";
|
||||||
|
document.getElementById("async-api").style.display = "block";
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
curl http://localhost:8081/api-docs > api/waas-api.json
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd async-api/site/
|
||||||
|
ag ../waas-async-api.yaml @asyncapi/html-template
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue