|
@@ -958,10 +958,11 @@ namespace LotteryWebApp.Areas.LotteryV2.Controllers
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
[HttpPost]
|
|
|
- public IActionResult ConfirmTransfer(string otp, string phone, string amount)
|
|
|
|
|
|
|
+ public IActionResult ConfirmTransfer(string otp, string phone, string amount, string channelPayment)
|
|
|
{
|
|
{
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
|
|
+ log.Info($"[ConfirmTransfer] START - otp: {otp}, phone: {phone}, amount: {amount}, channelPayment: {channelPayment}");
|
|
|
var token = HttpContext.Session.GetComplexData<string>("token");
|
|
var token = HttpContext.Session.GetComplexData<string>("token");
|
|
|
var msisdn = HttpContext.Session.GetComplexData<string>("msisdn");
|
|
var msisdn = HttpContext.Session.GetComplexData<string>("msisdn");
|
|
|
if (string.IsNullOrEmpty(token)) return Json(new { status = Code.SESSION_EXPIRED, message = "Session expired" });
|
|
if (string.IsNullOrEmpty(token)) return Json(new { status = Code.SESSION_EXPIRED, message = "Session expired" });
|
|
@@ -975,7 +976,9 @@ namespace LotteryWebApp.Areas.LotteryV2.Controllers
|
|
|
language = CultureInfo.CurrentCulture.Name.StartsWith("en") ? "0" : "1",
|
|
language = CultureInfo.CurrentCulture.Name.StartsWith("en") ? "0" : "1",
|
|
|
channel = configuration.GetSection("channel").Value
|
|
channel = configuration.GetSection("channel").Value
|
|
|
};
|
|
};
|
|
|
|
|
+ log.Info($"[ConfirmTransfer] Call ConfirmOTPApi Request: {JsonConvert.SerializeObject(otpRequest)}");
|
|
|
ConfirmOTPResponse otpResponse = api.ConfirmOTPApi(configuration, otpRequest);
|
|
ConfirmOTPResponse otpResponse = api.ConfirmOTPApi(configuration, otpRequest);
|
|
|
|
|
+ log.Info($"[ConfirmTransfer] Call ConfirmOTPApi Response: {JsonConvert.SerializeObject(otpResponse)}");
|
|
|
|
|
|
|
|
if (otpResponse.responseCode != Code.SUCCESS)
|
|
if (otpResponse.responseCode != Code.SUCCESS)
|
|
|
{
|
|
{
|
|
@@ -990,12 +993,14 @@ namespace LotteryWebApp.Areas.LotteryV2.Controllers
|
|
|
money = amount,
|
|
money = amount,
|
|
|
otp = otp,
|
|
otp = otp,
|
|
|
token = token,
|
|
token = token,
|
|
|
- channelPayment = Constants.BASIC_WALLET_TRANSFER,
|
|
|
|
|
|
|
+ channelPayment = channelPayment ?? Constants.BASIC_WALLET_TRANSFER,
|
|
|
language = CultureInfo.CurrentCulture.Name.StartsWith("en") ? "0" : "1",
|
|
language = CultureInfo.CurrentCulture.Name.StartsWith("en") ? "0" : "1",
|
|
|
channel = configuration.GetSection("channel").Value
|
|
channel = configuration.GetSection("channel").Value
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ log.Info($"[ConfirmTransfer] Call TransferMoneyApi Request: {JsonConvert.SerializeObject(xferRequest)}");
|
|
|
TransferMoneyResponse xferResponse = api.TransferMoneyApi(configuration, xferRequest);
|
|
TransferMoneyResponse xferResponse = api.TransferMoneyApi(configuration, xferRequest);
|
|
|
|
|
+ log.Info($"[ConfirmTransfer] Call TransferMoneyApi Response: {JsonConvert.SerializeObject(xferResponse)}");
|
|
|
|
|
|
|
|
if (xferResponse.responseCode == Code.SUCCESS)
|
|
if (xferResponse.responseCode == Code.SUCCESS)
|
|
|
{
|
|
{
|