diff --git a/.gitea/workflows/kub-deploy.yml b/.gitea/workflows/kub-deploy.yml
index 3313854..5b4f047 100644
--- a/.gitea/workflows/kub-deploy.yml
+++ b/.gitea/workflows/kub-deploy.yml
@@ -6,15 +6,15 @@ on:
- kub-stage
env:
- REGISTRY: 194.5.195.53:30080
+ REGISTRY: 185.252.31.44:30080
IMAGE_NAME: admin/cms
- K8S_SERVER: 194.5.195.53
+ K8S_SERVER: 185.252.31.44
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
- image: 194.5.195.53:32082/docker-sshpass:latest
+ image: 185.252.31.44:32082/docker-sshpass:latest
options: --privileged
steps:
- name: Start Docker daemon
@@ -22,7 +22,7 @@ jobs:
mkdir -p /etc/docker
cat > /etc/docker/daemon.json << 'DAEMON'
{
- "insecure-registries": ["194.5.195.53:30080", "194.5.195.53:32500", "194.5.195.53:32082"]
+ "insecure-registries": ["185.252.31.44:30080", "185.252.31.44:32500", "185.252.31.44:32082"]
}
DAEMON
echo "🚀 Starting Docker daemon..."
@@ -52,14 +52,14 @@ jobs:
- name: Login to Docker registries
run: |
- echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login 194.5.195.53:32082 -u admin --password-stdin
+ echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login 185.252.31.44:32082 -u admin --password-stdin
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u admin --password-stdin
- name: Publish Protobuf packages
run: |
echo "📦 Publishing Protobuf packages..."
docker run --rm --network host -e CI=true -v $(pwd):/src -w /src \
- 194.5.195.53:32082/dotnet/sdk:9.0 sh -c '
+ 185.252.31.44:32082/dotnet/sdk:9.0 sh -c '
for proj in $(find . -name "*Protobuf*.csproj" -type f); do
echo "📦 $proj"
dotnet restore "$proj" --configfile src/NuGet.config
diff --git a/.gitea/workflows/prod-deploy.yml b/.gitea/workflows/prod-deploy.yml
index 10e348d..b92363d 100644
--- a/.gitea/workflows/prod-deploy.yml
+++ b/.gitea/workflows/prod-deploy.yml
@@ -6,7 +6,7 @@ on:
- production
env:
- REGISTRY: 194.5.195.53:30080
+ REGISTRY: 185.252.31.44:30080
IMAGE_NAME: admin/cms
K8S_SERVER: 45.149.79.127
@@ -14,7 +14,7 @@ jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
- image: 194.5.195.53:32082/docker-sshpass:latest
+ image: 185.252.31.44:32082/docker-sshpass:latest
options: --privileged
steps:
- name: Start Docker daemon
@@ -22,7 +22,7 @@ jobs:
mkdir -p /etc/docker
cat > /etc/docker/daemon.json << 'DAEMON'
{
- "insecure-registries": ["194.5.195.53:30080", "194.5.195.53:32500", "194.5.195.53:32082"]
+ "insecure-registries": ["185.252.31.44:30080", "185.252.31.44:32500", "185.252.31.44:32082"]
}
DAEMON
echo "🚀 Starting Docker daemon..."
@@ -50,14 +50,14 @@ jobs:
- name: Login to Docker registries
run: |
- echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login 194.5.195.53:32082 -u admin --password-stdin
+ echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login 185.252.31.44:32082 -u admin --password-stdin
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u admin --password-stdin
- name: Publish Protobuf packages
run: |
echo "📦 Publishing Protobuf packages..."
docker run --rm --network host -v $(pwd):/src -w /src \
- 194.5.195.53:32082/dotnet/sdk:9.0 sh -c '
+ 185.252.31.44:32082/dotnet/sdk:9.0 sh -c '
for proj in $(find . -name "*Protobuf*.csproj" -type f); do
echo "📦 $proj"
dotnet restore "$proj" --configfile src/NuGet.config
@@ -65,7 +65,7 @@ jobs:
dotnet pack "$proj" -c Release --no-build -o "$(dirname $proj)/nupkg"
for nupkg in $(dirname $proj)/nupkg/*.nupkg; do
[ -f "$nupkg" ] && dotnet nuget push "$nupkg" \
- --source "http://194.5.195.53:32081/repository/foursat-nuget-hosted/index.json" \
+ --source "http://185.252.31.44:32081/repository/foursat-nuget-hosted/index.json" \
--api-key "admin:87zH26nbqT" \
--skip-duplicate --allow-insecure-connections || true
done
diff --git a/Dockerfile b/Dockerfile
index 633a367..676da6d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM 194.5.195.53:32082/dotnet/sdk:9.0 AS build
+FROM 185.252.31.44:32082/dotnet/sdk:9.0 AS build
WORKDIR /src
# Copy NuGet config first
@@ -11,7 +11,7 @@ COPY src/ ./
RUN dotnet restore "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj" --configfile NuGet.config
RUN dotnet publish "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj" -c Release -o /app/publish --no-restore
-FROM 194.5.195.53:32082/dotnet/aspnet:9.0 AS runtime
+FROM 185.252.31.44:32082/dotnet/aspnet:9.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
ENV ASPNETCORE_URLS=http://+:8080
diff --git a/k8s/production/cms-config.yaml b/k8s/production/cms-config.yaml
index a1a0674..a42dce0 100644
--- a/k8s/production/cms-config.yaml
+++ b/k8s/production/cms-config.yaml
@@ -33,12 +33,12 @@ stringData:
"DefaultEmail": "info@kbs2.ir",
"Packages": {
"4": {
- "GatewayAmountToman": 9700000,
- "WalletCreditToman": 13000000
+ "GatewayAmountToman": 11200000,
+ "WalletCreditToman": 12656000
},
"1": {
- "GatewayAmountToman": 97000000,
- "WalletCreditToman": 130000000
+ "GatewayAmountToman": 11200000,
+ "WalletCreditToman": 12656000
}
}
},
diff --git a/k8s/production/cms-deployment.yaml b/k8s/production/cms-deployment.yaml
index 9fdec43..92fa508 100644
--- a/k8s/production/cms-deployment.yaml
+++ b/k8s/production/cms-deployment.yaml
@@ -35,7 +35,7 @@ spec:
spec:
containers:
- name: cms
- image: 194.5.195.53:30080/admin/cms:prod
+ image: 185.252.31.44:30080/admin/cms:prod
imagePullPolicy: Always
ports:
- containerPort: 8080
diff --git a/k8s/staging/cms-config.yaml b/k8s/staging/cms-config.yaml
index fa9b9e3..8ed3bfd 100644
--- a/k8s/staging/cms-config.yaml
+++ b/k8s/staging/cms-config.yaml
@@ -34,12 +34,12 @@ stringData:
"DefaultEmail": "info@kbs2.ir",
"Packages": {
"4": {
- "GatewayAmountToman": 1000,
- "WalletCreditToman": 13000000
+ "GatewayAmountToman": 11200000,
+ "WalletCreditToman": 12656000
},
"1": {
- "GatewayAmountToman": 1000,
- "WalletCreditToman": 130000000
+ "GatewayAmountToman": 11200000,
+ "WalletCreditToman": 12656000
}
}
},
@@ -53,7 +53,7 @@ stringData:
"JwtAudience": "https://localhost",
"JwtExpiryInDays": 5,
"ConnectionStrings": {
- "DefaultConnection": "Data Source=194.5.195.53,31433; Initial Catalog=Foursat;User ID=sa;Password=87zH26nbqT;Connection Timeout=300000;MultipleActiveResultSets=True;Encrypt=False",
+ "DefaultConnection": "Data Source=185.252.31.44,31433; Initial Catalog=Foursat;User ID=sa;Password=87zH26nbqT;Connection Timeout=300000;MultipleActiveResultSets=True;Encrypt=False",
"providerName": "System.Data.SqlClient"
},
"Otp": {
diff --git a/k8s/staging/cms-deployment.yaml b/k8s/staging/cms-deployment.yaml
index f54219b..54a8ad0 100644
--- a/k8s/staging/cms-deployment.yaml
+++ b/k8s/staging/cms-deployment.yaml
@@ -35,7 +35,7 @@ spec:
spec:
containers:
- name: cms
- image: 194.5.195.53:30080/admin/cms:latest
+ image: 185.252.31.44:30080/admin/cms:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
diff --git a/src/CMSMicroservice.Infrastructure/Services/Payment/TwentyCardPaymentService.cs b/src/CMSMicroservice.Infrastructure/Services/Payment/TwentyCardPaymentService.cs
index f2c45fc..a62f829 100644
--- a/src/CMSMicroservice.Infrastructure/Services/Payment/TwentyCardPaymentService.cs
+++ b/src/CMSMicroservice.Infrastructure/Services/Payment/TwentyCardPaymentService.cs
@@ -58,7 +58,9 @@ public class TwentyCardPaymentService : IPaymentGatewayService
{
try
{
- var amount = ((long)request.Amount).ToString();
+ // ۲۰کارت amount را به ریال می‌گیرد (تومان × ۱۰)
+ var amountRial = ((long)request.Amount) * 10L;
+ var amount = amountRial.ToString();
var payerName = string.IsNullOrWhiteSpace(request.Name)
? (string.IsNullOrWhiteSpace(request.Mobile) ? "کاربر" : request.Mobile)
: request.Name.Trim();
@@ -85,8 +87,8 @@ public class TwentyCardPaymentService : IPaymentGatewayService
AddFormField(content, "national_id", request.NationalId);
_logger.LogInformation(
- "TwentyCard payment request: Amount={Amount} Toman, User={UserId}, Invoice={Invoice}",
- amount, request.UserId, invoice);
+ "TwentyCard payment request: Amount={AmountToman} Toman ({AmountRial} Rial), User={UserId}, Invoice={Invoice}",
+ (long)request.Amount, amountRial, request.UserId, invoice);
var response = await _httpClient.PostAsync("api/pgw/merchant/request", content, cancellationToken);
var responseBody = await response.Content.ReadAsStringAsync(cancellationToken);
@@ -169,7 +171,7 @@ public class TwentyCardPaymentService : IPaymentGatewayService
["terminal_username"] = _terminalUsername,
["terminal_password"] = _terminalPassword,
["authority"] = refId,
- ["amount"] = ((long)amountInToman).ToString()
+ ["amount"] = (((long)amountInToman) * 10L).ToString()
});
var response = await _httpClient.PostAsync("api/pgw/merchant/verify", content, cancellationToken);
diff --git a/src/CMSMicroservice.WebApi/Dockerfile b/src/CMSMicroservice.WebApi/Dockerfile
index 29ea4c6..b5be255 100644
--- a/src/CMSMicroservice.WebApi/Dockerfile
+++ b/src/CMSMicroservice.WebApi/Dockerfile
@@ -1,12 +1,12 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
-FROM 194.5.195.53:32082/dotnet/aspnet:9.0 AS base
+FROM 185.252.31.44:32082/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
-FROM 194.5.195.53:32082/dotnet/sdk:9.0 AS build
+FROM 185.252.31.44:32082/dotnet/sdk:9.0 AS build
WORKDIR /src
COPY ["CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj", "CMSMicroservice.WebApi/"]
COPY ["CMSMicroservice.Application/CMSMicroservice.Application.csproj", "CMSMicroservice.Application/"]
diff --git a/src/CMSMicroservice.WebApi/appsettings.Staging.json b/src/CMSMicroservice.WebApi/appsettings.Staging.json
index 557dd00..bab24eb 100644
--- a/src/CMSMicroservice.WebApi/appsettings.Staging.json
+++ b/src/CMSMicroservice.WebApi/appsettings.Staging.json
@@ -14,12 +14,12 @@
"DefaultEmail": "info@kbs2.ir",
"Packages": {
"4": {
- "GatewayAmountToman": 1000,
- "WalletCreditToman": 13000000
+ "GatewayAmountToman": 11200000,
+ "WalletCreditToman": 12656000
},
"1": {
- "GatewayAmountToman": 1000,
- "WalletCreditToman": 130000000
+ "GatewayAmountToman": 11200000,
+ "WalletCreditToman": 12656000
}
}
},
@@ -33,7 +33,7 @@
"JwtAudience": "https://localhost",
"JwtExpiryInDays": 5,
"ConnectionStrings": {
- "DefaultConnection": "Data Source=194.5.195.53,31433; Initial Catalog=Foursat;User ID=sa;Password=87zH26nbqT;Connection Timeout=300000;MultipleActiveResultSets=True;Encrypt=False",
+ "DefaultConnection": "Data Source=185.252.31.44,31433; Initial Catalog=Foursat;User ID=sa;Password=87zH26nbqT;Connection Timeout=300000;MultipleActiveResultSets=True;Encrypt=False",
"providerName": "System.Data.SqlClient"
},
"Otp": {
diff --git a/src/CMSMicroservice.WebApi/appsettings.json b/src/CMSMicroservice.WebApi/appsettings.json
index 74548da..2bc18ba 100644
--- a/src/CMSMicroservice.WebApi/appsettings.json
+++ b/src/CMSMicroservice.WebApi/appsettings.json
@@ -13,12 +13,12 @@
"DefaultEmail": "info@kbs2.ir",
"Packages": {
"4": {
- "GatewayAmountToman": 9700000,
- "WalletCreditToman": 13000000
+ "GatewayAmountToman": 11200000,
+ "WalletCreditToman": 12656000
},
"1": {
- "GatewayAmountToman": 97000000,
- "WalletCreditToman": 130000000
+ "GatewayAmountToman": 11200000,
+ "WalletCreditToman": 12656000
}
}
},
diff --git a/src/NuGet.config b/src/NuGet.config
index 59d2375..dd62980 100644
--- a/src/NuGet.config
+++ b/src/NuGet.config
@@ -3,8 +3,8 @@
-
-
+
+