Skip to content

Commit faa7079

Browse files
author
il2b
committed
Add CloudKassir project
1 parent 8c4f538 commit faa7079

File tree

79 files changed

+3503
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3503
-131
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish Spoleto.PaymentCallback.CloudKassir
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'src/Spoleto.PaymentCallback.CloudKassir/**'
8+
- 'LICENSE'
9+
- 'README.md'
10+
pull_request:
11+
branches: [ main ]
12+
13+
jobs:
14+
15+
Build-Publish:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v2
24+
with:
25+
dotnet-version: 6.0.x
26+
27+
- name: Restore dependencies
28+
run: dotnet restore src/Spoleto.PaymentCallback.CloudKassir/Spoleto.PaymentCallback.CloudKassir.csproj
29+
30+
- name: Build
31+
run: dotnet build src/Spoleto.PaymentCallback.CloudKassir/Spoleto.PaymentCallback.CloudKassir.csproj --configuration Release --no-restore
32+
33+
- name: Publish to Nuget
34+
uses: alirezanet/publish-nuget@v3.0.4
35+
with:
36+
# Filepath of the project to be packaged, relative to root of repository
37+
PROJECT_FILE_PATH: src/Spoleto.PaymentCallback.CloudKassir/Spoleto.PaymentCallback.CloudKassir.csproj
38+
# API key to authenticate with NuGet server
39+
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
40+
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
41+
INCLUDE_SYMBOLS: true
42+
# Flag to toggle git tagging, enabled by default
43+
TAG_COMMIT: false
44+
45+
46+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,3 +364,5 @@ FodyWeavers.xsd
364364

365365
# Any sensitive settings
366366
appsettings.Development.json
367+
.editorconfig
368+
.config/

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Spoleto.PaymentCallback
22

3-
The callback service for Alfa-Bank Fast payment system and Atol Online.
3+
The callback service for Alfa-Bank Fast payment system, Atol Online, CloudKassir.
44

55
https://github.com/spoleto-software/Spoleto.PaymentCallback
66

@@ -20,14 +20,23 @@ The base project for callback service for Atol Online.
2020

2121
https://github.com/spoleto-software/Spoleto.PaymentCallback/tree/main/src/Spoleto.PaymentCallback.AtolOnline
2222

23+
## Spoleto.PaymentCallback.CloudKassir
24+
25+
C# SDK для обработки уведомлений от CloudKassir
26+
27+
The base project for callback service for CloudKassir
28+
29+
https://github.com/spoleto-software/Spoleto.PaymentCallback/tree/main/src/Spoleto.PaymentCallback.CloudKassir
30+
2331
## Spoleto.PaymentCallback.Service
2432

2533
Web API сервис для получения уведомлений. Работает на NET 6.
2634

27-
Web API callback service for Alfa-Bank Fast payment system and Atol Online.
35+
Web API callback service for Alfa-Bank Fast payment system and Atol Online, CloudKassir.
2836

2937
https://github.com/spoleto-software/Spoleto.PaymentCallback/tree/main/src/Spoleto.PaymentCallback.Service
3038

39+
3140
## Клиент для интеграции с хостом Альфа-Банка для оплаты покупок через СБП
3241

3342
C# SDK для интеграции с хостом Альфа-Банка для оплаты покупок через СБП.

Spoleto.PaymentCallback.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WorkFlow", "WorkFlow", "{9D
2020
ProjectSection(SolutionItems) = preProject
2121
.github\workflows\publish-alfa-bank-to-nuget.yml = .github\workflows\publish-alfa-bank-to-nuget.yml
2222
.github\workflows\publish-atol-online-to-nuget.yml = .github\workflows\publish-atol-online-to-nuget.yml
23+
.github\workflows\publish-cloudkassir-to-nuget.yml = .github\workflows\publish-cloudkassir-to-nuget.yml
2324
EndProjectSection
2425
EndProject
26+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spoleto.PaymentCallback.CloudKassir", "src\Spoleto.PaymentCallback.CloudKassir\Spoleto.PaymentCallback.CloudKassir.csproj", "{C386A117-4D2F-48AE-A9A6-FD343BC86A02}"
27+
EndProject
2528
Global
2629
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2730
Debug|Any CPU = Debug|Any CPU
@@ -40,6 +43,10 @@ Global
4043
{2AD55D67-2E0A-48A6-B77B-5AA19E3E23A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
4144
{2AD55D67-2E0A-48A6-B77B-5AA19E3E23A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
4245
{2AD55D67-2E0A-48A6-B77B-5AA19E3E23A7}.Release|Any CPU.Build.0 = Release|Any CPU
46+
{C386A117-4D2F-48AE-A9A6-FD343BC86A02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{C386A117-4D2F-48AE-A9A6-FD343BC86A02}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{C386A117-4D2F-48AE-A9A6-FD343BC86A02}.Release|Any CPU.ActiveCfg = Release|Any CPU
49+
{C386A117-4D2F-48AE-A9A6-FD343BC86A02}.Release|Any CPU.Build.0 = Release|Any CPU
4350
EndGlobalSection
4451
GlobalSection(SolutionProperties) = preSolution
4552
HideSolutionNode = FALSE

src/Spoleto.PaymentCallback.AlfaBank/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Spoleto.PaymentCallback
22

3-
The callback service for Alfa-Bank Fast payment system and Atol Online.
3+
The callback service for Alfa-Bank Fast payment system, Atol Online, CloudKassir.
44

55
https://github.com/spoleto-software/Spoleto.PaymentCallback
66

src/Spoleto.PaymentCallback.AtolOnline/DefaultSettings.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/Spoleto.PaymentCallback.AtolOnline/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Spoleto.PaymentCallback
22

3-
The callback service for Alfa-Bank Fast payment system and Atol Online.
3+
The callback service for Alfa-Bank Fast payment system, Atol Online, CloudKassir.
44

55
https://github.com/spoleto-software/Spoleto.PaymentCallback
66

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text.Json.Serialization;
4+
5+
namespace Spoleto.PaymentCallback.CloudKassir.Models
6+
{
7+
8+
/// <summary>
9+
/// Базовый ответ API
10+
/// </summary>
11+
public class BaseResponse
12+
{
13+
/// <summary>
14+
/// Результат выполнения запроса (успешно или нет)
15+
/// </summary>
16+
[JsonPropertyName("Success")]
17+
public bool Success { get; set; }
18+
19+
/// <summary>
20+
/// Дополнительная информация
21+
/// </summary>
22+
[JsonPropertyName("Message")]
23+
public string Message { get; set; }
24+
25+
/// <summary>
26+
/// Предупреждение
27+
/// </summary>
28+
[JsonPropertyName("Warning")]
29+
public string Warning { get; set; }
30+
31+
/// <summary>
32+
/// Коды предупреждений
33+
/// </summary>
34+
[JsonPropertyName("WarningCodes")]
35+
public List<int> WarningCodes { get; set; }
36+
37+
/// <summary>
38+
/// Внутренний результат
39+
/// </summary>
40+
[JsonPropertyName("InnerResult")]
41+
public object InnerResult { get; set; }
42+
}
43+
44+
/// <summary>
45+
/// Базовый ответ с моделью
46+
/// </summary>
47+
public class BaseResponse<T> : BaseResponse
48+
{
49+
/// <summary>
50+
/// Модель данных
51+
/// </summary>
52+
[JsonPropertyName("Model")]
53+
public T Model { get; set; }
54+
}
55+
56+
57+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using Spoleto.MQ.Messages;
5+
6+
namespace Spoleto.PaymentCallback.CloudKassir.Models
7+
{
8+
public class CKFiscalReport : ReceiptNotification, IUniqueMessage
9+
{
10+
/// <summary>
11+
/// Уникальное имя очереди для RabbitMQ.
12+
/// </summary>
13+
public string UniqueName => $"{nameof(CKFiscalReport)}.{Id}";
14+
15+
public DateTime? Timestamp { get; set; }
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Text.Json.Serialization;
3+
4+
namespace Spoleto.PaymentCallback.CloudKassir.Models
5+
{
6+
/// <summary>
7+
/// Детализация сумм
8+
/// </summary>
9+
public class AmountsDetail : Amounts
10+
{
11+
/// <summary>
12+
/// Общая сумма
13+
/// </summary>
14+
[JsonPropertyName("Sum")]
15+
public decimal Sum { get; set; }
16+
}
17+
}

0 commit comments

Comments
 (0)