Browse Source

#28335 Provide Cost Rate in FX API for Website

feature/Redmine-17825-Email_Template
shakun 5 months ago
parent
commit
634dae3438
  1. 2
      Business/Mobile/IMobileServices.cs
  2. 8
      Business/Mobile/MobileServices.cs
  3. 1
      Common/Model/TranHistoryResponse.cs
  4. 6
      JsonRx/ApiV3/SendTransactionController.cs
  5. 2
      Repository/Mobile/IMobileServicesRepo.cs
  6. 3
      Repository/Mobile/MobileServicesRepo.cs
  7. 1
      Repository/MobileV2/MobileV2Repo.cs

2
Business/Mobile/IMobileServices.cs

@ -93,7 +93,7 @@ namespace Business.Mobile
JsonRxResponse CheckInfoAgree(string username);
JsonRxResponse GetFieldsByProduct(MappingType type, string customer, string receiverId);
JsonRxResponse GetFieldsByProduct(MappingType type, string customer, string receiverId, string payoutPartner);
JsonRxResponse ValidateReferralCode(string referralCode);
//JsonRxResponse QueryAddress(string postCode);

8
Business/Mobile/MobileServices.cs

@ -2957,7 +2957,7 @@ namespace Business.Mobile
}
public JsonRxResponse GetFieldsByProduct(Common.Model.Config.MappingType type, string customerId, string receiverId)
public JsonRxResponse GetFieldsByProduct(Common.Model.Config.MappingType type, string customerId, string receiverId, string payoutPartner)
{
JsonRxResponse jsonRx = new JsonRxResponse
{
@ -2985,7 +2985,7 @@ namespace Business.Mobile
else if (type == Common.Model.Config.MappingType.REWARD_POINT)
{
var response1 = _requestServices.GetRewardFee(customerId);
response1.PaymentOptions = new PaymentOptions() { Options = GetPaymentMethods(receiverId), HeaderText = "How do like to pay?" };
response1.PaymentOptions = new PaymentOptions() { Options = GetPaymentMethods(receiverId, payoutPartner), HeaderText = "How do you like to pay ?" };
if (response1 != null)
{
@ -3045,9 +3045,9 @@ namespace Business.Mobile
}
public List<Option> GetPaymentMethods(string receiverId)
public List<Option> GetPaymentMethods(string receiverId, string pcountryid)
{
var paymentMethods = _requestServices.GetPaymentMethod(receiverId);
var paymentMethods = _requestServices.GetPaymentMethod(receiverId, pcountryid);
List<Option> options;
string mappingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConfigurationManager.AppSettings["PaymentConfigFilePath"].ToString());
using (StreamReader reader = File.OpenText(mappingPath))

1
Common/Model/TranHistoryResponse.cs

@ -33,5 +33,6 @@
public string ColorCode { get; set; }
public string TextCode { get; set; }
public string ReceiverId { get; set; }
}
}

6
JsonRx/ApiV3/SendTransactionController.cs

@ -101,14 +101,14 @@ namespace JsonRx.ApiV3
[HttpGet]
//[ApplicationLevelAuthentication]
[Route("mobile/{customer}/GetFieldsByProduct")]
public IHttpActionResult GetFieldsByProduct(string customer, [FromUri] MappingType type, [FromUri] string receiverId = "", [FromUri] string payoutPartner = "", [FromUri] bool IsAccountValidation = false)
public IHttpActionResult GetFieldsByProduct(string customer, [FromUri] MappingType type, [FromUri] string receiverId = "", [FromUri] string payoutPartner = "", [FromUri] bool IsAccountValidation = false, [FromUri] string country = "")
{
var processid = Guid.NewGuid();
LogicalThreadContext.Properties[LoggerProperty.PROCESSID] = processid;
LogicalThreadContext.Properties[LoggerProperty.CREATEDBY] = customer;
LogicalThreadContext.Properties[LoggerProperty.METHODNAME] = "GetFieldsByProduct";
Log.Debug("GetFieldsByProduct | REQUEST : Type: " + type + " Customer: " + customer + " MappingType: " + type + " receiverId: " + receiverId + " payoutPartner: " + payoutPartner + " IsAccountValidation: " + IsAccountValidation);
Log.Debug("GetFieldsByProduct | REQUEST : Type: " + type + " Customer: " + customer + " MappingType: " + type + " receiverId: " + receiverId + " payoutPartner: " + payoutPartner + " country: " + country);
JsonRxResponse res = new JsonRxResponse();
int mappingTypeInt;
@ -116,7 +116,7 @@ namespace JsonRx.ApiV3
if (Enum.IsDefined(typeof(MappingType), type)
|| Enum.IsDefined(typeof(MappingType), mappingTypeInt))
{
res = _requestServices.GetFieldsByProduct(type, customer, receiverId);
res = _requestServices.GetFieldsByProduct(type, customer, receiverId, country);
if (type == Common.Model.Config.MappingType.REWARD_POINT)
{

2
Repository/Mobile/IMobileServicesRepo.cs

@ -102,6 +102,6 @@ namespace Repository.Mobile
JsonRxResponse ValidateReferralCode(string referralCode);
UserDetails GetUserDetails(string email);
//ataSet StaticQueryAddress();
List<KeyValues> GetPaymentMethod(string receiverId);
List<KeyValues> GetPaymentMethod(string receiverId, string pcountryid);
}
}

3
Repository/Mobile/MobileServicesRepo.cs

@ -204,11 +204,12 @@ namespace Repository.Mobile
};
}
public List<KeyValues> GetPaymentMethod(string receiverId)
public List<KeyValues> GetPaymentMethod(string receiverId, string pcountryid)
{
List<KeyValues> lst = new List<KeyValues>();
var sql = "EXEC proc_countryRateMaster @flag='getListById'";
sql += ", @receiverId = " + _dao.FilterString(receiverId);
sql += ", @countryId = " + _dao.FilterString(pcountryid);
var dt = _dao.ExecuteDataTable(sql);
foreach (DataRow row in dt.Rows)

1
Repository/MobileV2/MobileV2Repo.cs

@ -158,6 +158,7 @@ namespace Repository.MobileV2
ColorIcon = GetColor(dr["payStatus"].ToString()),
ColorCode = GetColorCode(dr["payStatus"].ToString()),
TextCode= GetTextCode(dr["payStatus"].ToString()),
ReceiverId = Convert.ToString(dr["Receiverid"])
// PayoutAgent = Convert.ToString(dr["PayoutAgent"]),
};
myTransferDto.RecentTransactions.Add(tranHistoryResponse);

Loading…
Cancel
Save