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:
@@ -231,7 +231,7 @@ message GetCustomerWithdrawalSettingsResponse
|
|||||||
|
|
||||||
message InitiateMagicChargeRequest
|
message InitiateMagicChargeRequest
|
||||||
{
|
{
|
||||||
int64 amount = 1; // مبلغ واریزی واقعی (ریال)
|
int64 amount = 1; // مبلغ واریزی (تومان)
|
||||||
}
|
}
|
||||||
|
|
||||||
message InitiateMagicChargeResponse
|
message InitiateMagicChargeResponse
|
||||||
@@ -259,7 +259,7 @@ message GetMagicWalletStatusResponse
|
|||||||
|
|
||||||
message InitiateDiscountChargeRequest
|
message InitiateDiscountChargeRequest
|
||||||
{
|
{
|
||||||
int64 amount = 1; // مبلغ واریزی (ریال)
|
int64 amount = 1; // مبلغ واریزی (تومان)
|
||||||
}
|
}
|
||||||
|
|
||||||
message InitiateDiscountChargeResponse
|
message InitiateDiscountChargeResponse
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public class PaymentCallbackController : ControllerBase
|
|||||||
if (string.IsNullOrEmpty(authority))
|
if (string.IsNullOrEmpty(authority))
|
||||||
{
|
{
|
||||||
_logger.LogError("Magic charge callback: Authority is missing");
|
_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
|
var result = await _sender.Send(new VerifyMagicWalletChargeCommand
|
||||||
@@ -179,12 +179,12 @@ public class PaymentCallbackController : ControllerBase
|
|||||||
"Magic charge completed successfully. Authority={Authority}",
|
"Magic charge completed successfully. Authority={Authority}",
|
||||||
authority);
|
authority);
|
||||||
|
|
||||||
return Redirect($"{frontOfficeBaseUrl}/magic-wallet?payment=success");
|
return Redirect($"{frontOfficeBaseUrl}/profile/magic-wallet?payment=success");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Magic charge callback error. Authority={Authority}", authority);
|
_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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user