Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Failing after 19m40s
Build and Deploy to Production / build-and-deploy (push) Failing after 19m40s
This commit is contained in:
@@ -3,6 +3,7 @@ using CMSMicroservice.Application.PackageCQ.Commands.VerifyUserPackagePurchasePa
|
||||
using CMSMicroservice.Application.Common.Interfaces;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.CompleteOrderPayment;
|
||||
using CMSMicroservice.Application.WalletCQ.Commands.VerifyDiscountWalletCharge;
|
||||
using CMSMicroservice.Application.WalletCQ.Commands.VerifyCreditWalletCharge;
|
||||
using CMSMicroservice.Application.WalletCQ.Commands.VerifyMagicWalletCharge;
|
||||
using CMSMicroservice.Domain.Entities;
|
||||
using CMSMicroservice.Domain.Entities.Payment;
|
||||
@@ -174,6 +175,19 @@ public class ZarinpalReconciliationJob
|
||||
}, ct);
|
||||
break;
|
||||
|
||||
case "credit-wallet":
|
||||
if (!paymentTx.UserId.HasValue)
|
||||
throw new InvalidOperationException(
|
||||
$"UserId is null for credit-wallet authority {authority}");
|
||||
|
||||
await _sender.Send(new VerifyCreditWalletChargeCommand
|
||||
{
|
||||
Authority = authority,
|
||||
UserId = paymentTx.UserId.Value,
|
||||
Amount = paymentTx.Amount
|
||||
}, ct);
|
||||
break;
|
||||
|
||||
case "discount-order":
|
||||
await ReconcileDiscountOrderAsync(paymentTx, ct);
|
||||
break;
|
||||
@@ -194,6 +208,8 @@ public class ZarinpalReconciliationJob
|
||||
return "magic-wallet";
|
||||
if (callbackUrl.Contains("type=discount-wallet", StringComparison.OrdinalIgnoreCase))
|
||||
return "discount-wallet";
|
||||
if (callbackUrl.Contains("type=credit-wallet", StringComparison.OrdinalIgnoreCase))
|
||||
return "credit-wallet";
|
||||
if (callbackUrl.Contains("type=discount-order", StringComparison.OrdinalIgnoreCase))
|
||||
return "discount-order";
|
||||
// Package callbacks have orderId= but no type= parameter
|
||||
|
||||
Reference in New Issue
Block a user