feat: Implement real Daya API integration with configurable mock/real service

This commit is contained in:
masoodafar-web
2025-12-06 21:02:51 +03:30
parent e46f54ca5b
commit a0da7eb8e0
6 changed files with 274 additions and 20 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ COPY ["CMSMicroservice.Application/CMSMicroservice.Application.csproj", "CMSMicr
COPY ["CMSMicroservice.Domain/CMSMicroservice.Domain.csproj", "CMSMicroservice.Domain/"]
COPY ["CMSMicroservice.Infrastructure/CMSMicroservice.Infrastructure.csproj", "CMSMicroservice.Infrastructure/"]
COPY ["CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj", "CMSMicroservice.Protobuf/"]
RUN dotnet restore "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj"
RUN dotnet restore "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj" --configfile ../NuGet.config
COPY . .
WORKDIR "/src/CMSMicroservice.WebApi"
RUN dotnet build "CMSMicroservice.WebApi.csproj" -c Release -o /app/build
@@ -115,7 +115,7 @@ public class DayaLoanCheckWorker
"daya-loan-check",
worker => worker.ExecuteAsync(),
"*/15 * * * *", // هر 15 دقیقه
TimeZoneInfo.Utc
TimeZoneInfo.Local
);
}
}
@@ -44,6 +44,12 @@
"BaseUrl": "https://api.daya.ir",
"ApiKey": "YOUR_DAYA_API_KEY"
},
"DayaApi": {
"UseMock": false,
"BaseAddress": "https://testdaya.tadbirandishan.com",
"MerchantPermissionKey": "56146364$04sXjethI5WxhItR1Q9xnmFdJzl2BB8Bclsq8dAy7YVSZp3vtt-wP7ivrcCvmKLq",
"CacheDurationMinutes": 20
},
"AllowedHosts": "*",
"Kestrel": {
"EndpointDefaults": {