fix: wallet callback URL issues
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:
masoodafar-web
2026-02-27 22:09:15 +03:30
parent 721661af0f
commit ed2b20a98e
3 changed files with 18 additions and 5 deletions
@@ -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");
}
}
@@ -0,0 +1,13 @@
{
"CmsBaseUrl": "https://localhost:32846",
"FrontOfficeBaseUrl": "http://localhost:5268",
"ZarinPal": {
"UseSandbox": true
},
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft.AspNetCore": "Warning"
}
}
}