Update payment redirect logic in Verify method to include callback URL

This commit is contained in:
2025-11-18 12:46:50 +03:30
parent e81a44dd2f
commit 164388dac3

View File

@@ -470,8 +470,9 @@ public class institutionContractController : AdminBaseController
public async Task<ActionResult<OperationResult<string>>> Verify([FromBody] InstitutionVerificationRequest command)
{
// URL برای redirect به درگاه پرداخت
var paymentRedirectUrl = Url.Action("ProcessPayment", "institutionContract", new { area = "Admin" }, Request.Scheme);
var res = await _institutionContractApplication.VerifyOtpAndMakeGateway(command.Id, command.Code, paymentRedirectUrl);
var paymentRedirectUrl = Url.Action("ProcessPayment", "institutionContract", null, Request.Scheme);
var callback = Url.Action("Verify", "General", null, Request.Scheme);
var res = await _institutionContractApplication.VerifyOtpAndMakeGateway(command.Id, command.Code, callback);
if (!res.IsSuccedded)
return new OperationResult<string>().Failed(res.Message);