Browse Source

Merge branch 'feature/19315_Customer-Registration-new' of http://202.166.220.79:3000/IME-LONDON/CustomerPortal into feature/19315_Customer-Registration-new

feature/19315_Customer-Registration-new
Dinesh 11 months ago
parent
commit
6cb924d1e6
  1. 10
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/ThirdPartyAPI.cs
  2. 5
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/Notification/RestApiClient.cs
  3. 2
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs

10
CustomerOnlineV2/CustomerOnlineV2.Business/Business/ThirdPartyAPI.cs

@ -1,4 +1,6 @@
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Helper;
using CustomerOnlineV2.Common.Models;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Net.Http.Headers;
@ -9,9 +11,11 @@ namespace CustomerOnlineV2.Business.Business
public class ThirdPartyAPI
{
private static int timeOut = 100;
private string tp_base_url = "http://77.68.15.91:1083/api/v1/";
private string apiAccessKey = "KPb1ttRs3CJnORpVU8SmAKUs7a42vtvjzQ47gU0b4u0vxAEI0PgZref6puzkVhLTX2PRNMGCbnb2TglupsjV5AGhYvw8a8POTcUcFSrEdHmTkhkIGNvUvxSpKjUOXGFQWaGU1bxoqqUSaFOmNE5zGojVmwPoMy38CNLwnpQKjdsIuxCKGCApa2gWHJl9gebmIpUODv9jAZgmMEaXqyR4CLg4iSksfTyYNjdqxEE88P5THYt5GuNk8Ti6K2RxIKfPWY49hBOpiYnXcApgSDiKFYqQG9WuZ7cvDGJIWg5WgWKjGle8Y3OydhONXVkN5OMPXDA4VZkK4c5nM363Zkg4w4qdzWuwhsEoAwU4rej6sMRZue3L0BowBJja1OK0iPoTX70EexX8rviMLOZPUDwhxzkL3eODS69VEEbjHb8WSjhho5h3KnCE4tcqCWihwSZ8Yuyhw1rzIMNw2C8pN1GEJyXc6goIFkf7dmK9ynJSxu52D9GjOkKqoD7dFNFulOFVfgeCuhPDYG2A2c2RSvGHv24VDXvmGVaAMLiPtsTz5oD8f0na7fX1xGg0Qveh0KgQL5THnrMK6gm5Ky7O8nbecIxY";
//private string tp_base_url = Common.Configs.ConfigurationManager.AppSettings["tp_base_url"];
//private string apiAccessKey = Common.Configs.ConfigurationManager.AppSettings["apiAccessKey"];
private string tp_base_url = Utilities.ReadFromAppSettings("tp_base_url");
private string apiAccessKey = Utilities.ReadFromAppSettings("apiAccessKey");
public ResponseModel ThirdPartyApiGetDataOnly<RequestModel, ResponseModel>(RequestModel model, string api_url, out APIJsonResponse jsonResponse, string MethodType = "post")
{

5
CustomerOnlineV2/CustomerOnlineV2.Common/Models/Notification/RestApiClient.cs

@ -1,4 +1,5 @@
using CustomerOnlineV2.Common.Configs;
using CustomerOnlineV2.Common.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
@ -17,8 +18,8 @@ namespace CustomerOnlineV2.Common.Models.Notification
//string authHeader = ConfigurationManager.AppSettings["ApiUser"].ToString() + ":" +ConfigurationManager.AppSettings["ApiPwd"].ToString();
//var plainTextBytes = Encoding.UTF8.GetBytes(authHeader);
//string encodedAuthHeader = Convert.ToBase64String(plainTextBytes);
string thirdPartyUrl = "http://77.68.15.91:1083/api/v1/"; //ConfigurationManager.AppSettings["ThirdParty_Base_Url"].ToString();
string apiAccessKey = "KPb1ttRs3CJnORpVU8SmAKUs7a42vtvjzQ47gU0b4u0vxAEI0PgZref6puzkVhLTX2PRNMGCbnb2TglupsjV5AGhYvw8a8POTcUcFSrEdHmTkhkIGNvUvxSpKjUOXGFQWaGU1bxoqqUSaFOmNE5zGojVmwPoMy38CNLwnpQKjdsIuxCKGCApa2gWHJl9gebmIpUODv9jAZgmMEaXqyR4CLg4iSksfTyYNjdqxEE88P5THYt5GuNk8Ti6K2RxIKfPWY49hBOpiYnXcApgSDiKFYqQG9WuZ7cvDGJIWg5WgWKjGle8Y3OydhONXVkN5OMPXDA4VZkK4c5nM363Zkg4w4qdzWuwhsEoAwU4rej6sMRZue3L0BowBJja1OK0iPoTX70EexX8rviMLOZPUDwhxzkL3eODS69VEEbjHb8WSjhho5h3KnCE4tcqCWihwSZ8Yuyhw1rzIMNw2C8pN1GEJyXc6goIFkf7dmK9ynJSxu52D9GjOkKqoD7dFNFulOFVfgeCuhPDYG2A2c2RSvGHv24VDXvmGVaAMLiPtsTz5oD8f0na7fX1xGg0Qveh0KgQL5THnrMK6gm5Ky7O8nbecIxY";
string thirdPartyUrl = Utilities.ReadFromAppSettings("tp_base_url");
string apiAccessKey = Utilities.ReadFromAppSettings("apiAccessKey");
var httpClient = new HttpClient();
httpClient.BaseAddress = new Uri(thirdPartyUrl);

2
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs

@ -140,7 +140,7 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository
idIssueDate = Convert.ToString(item["idIssueDate"]),
idExpiryDate = Convert.ToString(item["idExpiryDate"]),
nativeCountry = Convert.ToString(item["ICountryName"])
}); ;
});
}
_response.CustomerListModel = obj;
}

Loading…
Cancel
Save