feat(payment): enhance TwentyCard payment integration and update configuration
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled

- Added support for optional Email and NationalId fields in PaymentRequest for TwentyCard transactions.
- Updated TwentyCardPaymentService to handle multipart/form-data requests and improved error handling.
- Modified appsettings and configuration files for both production and staging environments to include updated BaseUrl and credentials for TwentyCard.
- Updated README to reflect the new documentation location.
This commit is contained in:
masoodafar-web
2026-09-21 21:31:17 +03:30
parent 2b958bd214
commit 29426022aa
8 changed files with 91 additions and 29 deletions
@@ -223,7 +223,7 @@ public class PackageService : PackageContract.PackageContractBase
var user = await _context.Users
.AsNoTracking()
.Where(u => u.Id == userId)
.Select(u => new { u.Mobile, u.FirstName, u.LastName })
.Select(u => new { u.Mobile, u.FirstName, u.LastName, u.Email, u.NationalCode })
.FirstOrDefaultAsync(cancellationToken);
// Callback URL از config — نه از ورودی کاربر (امنیت)
@@ -241,7 +241,9 @@ public class PackageService : PackageContract.PackageContractBase
Name = payerName,
Invoice = purchase.Id.ToString(),
Description = $"خرید پکیج {package.Title}",
CallbackUrl = callbackUrl
CallbackUrl = callbackUrl,
Email = user?.Email,
NationalId = user?.NationalCode
}, cancellationToken);
if (!paymentResult.IsSuccess)