fix: wallet callback URL issues
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
- PaymentCallbackController: fix redirect paths /magic-wallet → /profile/magic-wallet - Add appsettings.Development.json with local CmsBaseUrl (localhost:32846) and FrontOfficeBaseUrl (localhost:5268) - Proto: fix comments ریال → تومان in wallet charge messages Root cause: CmsBaseUrl in appsettings.json points to stage (cms.se.kbs1.ir), so when testing locally, ZarinPal callback went to stage CMS instead of local. Also redirect after verify used wrong FO path (/magic-wallet instead of /profile/magic-wallet).
This commit is contained in:
@@ -166,7 +166,7 @@ public class PaymentCallbackController : ControllerBase
|
||||
if (string.IsNullOrEmpty(authority))
|
||||
{
|
||||
_logger.LogError("Magic charge callback: Authority is missing");
|
||||
return Redirect($"{frontOfficeBaseUrl}/magic-wallet?payment=error&reason=no-authority");
|
||||
return Redirect($"{frontOfficeBaseUrl}/profile/magic-wallet?payment=error&reason=no-authority");
|
||||
}
|
||||
|
||||
var result = await _sender.Send(new VerifyMagicWalletChargeCommand
|
||||
@@ -179,12 +179,12 @@ public class PaymentCallbackController : ControllerBase
|
||||
"Magic charge completed successfully. Authority={Authority}",
|
||||
authority);
|
||||
|
||||
return Redirect($"{frontOfficeBaseUrl}/magic-wallet?payment=success");
|
||||
return Redirect($"{frontOfficeBaseUrl}/profile/magic-wallet?payment=success");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Magic charge callback error. Authority={Authority}", authority);
|
||||
return Redirect($"{frontOfficeBaseUrl}/magic-wallet?payment=failed");
|
||||
return Redirect($"{frontOfficeBaseUrl}/profile/magic-wallet?payment=failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user