// // This method is designed to load prompts for type "O" - optional data for fleet cards // type "F" - fuel prompts are loaded along with the profile in Loadprofile method (card profile class) /// <summary> /// Method to load prompts /// </summary> /// <param name="cardPrompts">Card prompts</param> /// <param name="cc">Credit card</param> /// <param name="profileId">Profile Id</param> public void Load_Prompts(ref CardPrompts cardPrompts, Credit_Card cc, string profileId) { //2013 11 08 - Reji - Wex Fleet Card Integration var profPromptLinkClause = " And 1=2 "; if (cc != null) { if (!string.IsNullOrEmpty(cc.Crd_Type)) { profPromptLinkClause = ""; } if (cc.Crd_Type == "F" && cc.GiftType.ToUpper() == "W") { // profPromptLinkClause = ProfPromptLinkList(cc, profileId); } } var prompts = _cardService.LoadCardPrompts(profileId); //2013 11 08 - Reji - Wex Fleet Card Integration - End foreach (var prompt in prompts) { cardPrompts.Add(prompt.MaxLength, prompt.MinLength, prompt.PromptMessage, prompt.PromptSeq, prompt.PromptID, "", prompt.PromptID.ToString()); } }
/// <summary> /// method to get the card profile prompts /// </summary> /// <param name="prompts"></param> /// <param name="cc"></param> /// <param name="profileId"></param> public void GetProfilePrompts(ref CardPrompts prompts, Credit_Card cc, string profileId) { var promptCodeString = cc.Track2?.Replace(";" + cc.Cardnumber + "=", "").Replace("?", ""); promptCodeString = promptCodeString?.Substring(4, 1) + promptCodeString?.Substring(promptCodeString.Length - 1, 1); if (promptCodeString == "00") { return; } if (string.IsNullOrEmpty(promptCodeString)) { prompts.Add(20, 3, "Enter Card Data ", 1, 5009, "", ""); return; } _wexService.GetCardProfilePrompts(ref prompts, promptCodeString, profileId); }