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/staging/cms-config.yaml b/k8s/staging/cms-config.yaml index b3f146b..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 } } }, 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/appsettings.Staging.json b/src/CMSMicroservice.WebApi/appsettings.Staging.json index 40cee9b..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 } } }, diff --git a/src/CMSMicroservice.WebApi/appsettings.json b/src/CMSMicroservice.WebApi/appsettings.json index 498f197..45b86d5 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 } } },