Browse Source

#28335 Provide Cost Rate in FX API for Website

feature/Redmine-17825-Email_Template
shakun 5 months ago
parent
commit
da905a2b5d
  1. 2
      Business/Mobile/IMobileServices.cs
  2. 8
      Business/Mobile/MobileServices.cs
  3. 2
      Common/Model/Config/ResponseMsgType.cs
  4. 6
      JsonRx/ApiV3/SendTransactionController.cs
  5. 7
      JsonRx/Config/ResponseMsg.json
  6. 3
      Repository/Mobile/IMobileServicesRepo.cs
  7. 8
      Repository/Mobile/MobileServicesRepo.cs

2
Business/Mobile/IMobileServices.cs

@ -93,7 +93,7 @@ namespace Business.Mobile
JsonRxResponse CheckInfoAgree(string username); 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 ValidateReferralCode(string referralCode);
//JsonRxResponse QueryAddress(string postCode); //JsonRxResponse QueryAddress(string postCode);

8
Business/Mobile/MobileServices.cs

@ -2959,7 +2959,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 JsonRxResponse jsonRx = new JsonRxResponse
{ {
@ -2987,7 +2987,7 @@ namespace Business.Mobile
else if (type == Common.Model.Config.MappingType.REWARD_POINT) else if (type == Common.Model.Config.MappingType.REWARD_POINT)
{ {
var response1 = _requestServices.GetRewardFee(customerId); 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) if (response1 != null)
{ {
@ -3047,9 +3047,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; List<Option> options;
string mappingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConfigurationManager.AppSettings["PaymentConfigFilePath"].ToString()); string mappingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConfigurationManager.AppSettings["PaymentConfigFilePath"].ToString());
using (StreamReader reader = File.OpenText(mappingPath)) using (StreamReader reader = File.OpenText(mappingPath))

2
Common/Model/Config/ResponseMsgType.cs

@ -262,6 +262,8 @@ namespace Common.Model.Config
[Description("mobile/newUserRegister")] [Description("mobile/newUserRegister")]
USER_REGISTER_FAIL_7, USER_REGISTER_FAIL_7,
[Description("mobile/newUserRegister")]
NEW_USER_REGISTER_FAIL_8,
[Description("mobile/requestOTP")] [Description("mobile/requestOTP")]
REQUEST_OTP_SUCCESS_1, REQUEST_OTP_SUCCESS_1,

6
JsonRx/ApiV3/SendTransactionController.cs

@ -101,14 +101,14 @@ namespace JsonRx.ApiV3
[HttpGet] [HttpGet]
//[ApplicationLevelAuthentication] //[ApplicationLevelAuthentication]
[Route("mobile/{customer}/GetFieldsByProduct")] [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(); var processid = Guid.NewGuid();
LogicalThreadContext.Properties[LoggerProperty.PROCESSID] = processid; LogicalThreadContext.Properties[LoggerProperty.PROCESSID] = processid;
LogicalThreadContext.Properties[LoggerProperty.CREATEDBY] = customer; LogicalThreadContext.Properties[LoggerProperty.CREATEDBY] = customer;
LogicalThreadContext.Properties[LoggerProperty.METHODNAME] = "GetFieldsByProduct"; 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(); JsonRxResponse res = new JsonRxResponse();
int mappingTypeInt; int mappingTypeInt;
@ -116,7 +116,7 @@ namespace JsonRx.ApiV3
if (Enum.IsDefined(typeof(MappingType), type) if (Enum.IsDefined(typeof(MappingType), type)
|| Enum.IsDefined(typeof(MappingType), mappingTypeInt)) || 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) if (type == Common.Model.Config.MappingType.REWARD_POINT)
{ {

7
JsonRx/Config/ResponseMsg.json

@ -760,6 +760,11 @@
"Lang": "en" "Lang": "en"
}, },
{ {
"Key": "NEW_USER_REGISTER_FAIL_8",
"Message": "Invalid referral code!",
"Lang": "en"
},
{
"Key": "NEW_USER_REGISTER_FAIL_6", "Key": "NEW_USER_REGISTER_FAIL_6",
"Message": "Password is missing!", "Message": "Password is missing!",
"Lang": "en" "Lang": "en"
@ -1901,7 +1906,7 @@
}, },
{ {
"Key": "INVITE_MESSAGE_BODY", "Key": "INVITE_MESSAGE_BODY",
"Message": "You and your friend will each be given @rewardAmount £ in bonus credit. There may be minimum send requirements.",
"Message": "You and your friend will each be given £ @rewardAmount in bonus credit. Get £ @RegReward after they successfully register, and £ @TranReward after their first transaction. There may be minimum send requirements. Terms and Conditions.",
"Lang": "en" "Lang": "en"
}, },
{ {

3
Repository/Mobile/IMobileServicesRepo.cs

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

8
Repository/Mobile/MobileServicesRepo.cs

@ -204,11 +204,13 @@ namespace Repository.Mobile
}; };
} }
public List<KeyValues> GetPaymentMethod(string receiverId)
public List<KeyValues> GetPaymentMethod(string receiverId, string pcountryid)
{ {
List<KeyValues> lst = new List<KeyValues>(); List<KeyValues> lst = new List<KeyValues>();
var sql = "EXEC proc_countryRateMaster @flag='getListById'"; var sql = "EXEC proc_countryRateMaster @flag='getListById'";
sql += ", @receiverId = " + _dao.FilterString(receiverId); sql += ", @receiverId = " + _dao.FilterString(receiverId);
//sql += ", @user = " + _dao.FilterString("mobileapi");
sql += ", @countryId = " + _dao.FilterString(pcountryid);
var dt = _dao.ExecuteDataTable(sql); var dt = _dao.ExecuteDataTable(sql);
foreach (DataRow row in dt.Rows) foreach (DataRow row in dt.Rows)
@ -1387,6 +1389,10 @@ namespace Repository.Mobile
{ {
enumString = RESPONSE_MSG.NEW_USER_REGISTER_FAIL_3.ToString(); enumString = RESPONSE_MSG.NEW_USER_REGISTER_FAIL_3.ToString();
} }
else if (res.ResponseCode.Equals("8"))
{
enumString = RESPONSE_MSG.NEW_USER_REGISTER_FAIL_8.ToString();
}
var map = Utilities.GetLanguageMapping(enumString, lang); var map = Utilities.GetLanguageMapping(enumString, lang);
return new JsonRxResponse { ErrorCode = res.ResponseCode.Equals("0") ? "0" : "1", Msg = map.Message, Id = res.Id, Extra = res.Extra }; return new JsonRxResponse { ErrorCode = res.ResponseCode.Equals("0") ? "0" : "1", Msg = map.Message, Id = res.Id, Extra = res.Extra };

Loading…
Cancel
Save