public async Task <IHttpActionResult> CreateNewClient(VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.ClientOnboardingInp inp) { VisaCheckOut.Models.DTO <VisaCheckOut.Models.VisaCheckoutOutputs.RelationshipManagementOut.ClientOnboardingDTO> dto = new Models.DTO <ClientOnboardingDTO>(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inps = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inps.UserId = useriD; inps.RoleName = currentRoles; try { Errordetail err = new Errordetail(); dto = relarionship.CreateNewClient(inp); if (dto.response.message == "Created") { return(Ok(dto)); } } catch (Exception ex) { return(Ok(dto)); } return(Ok(dto)); }
public async Task <IHttpActionResult> GetRelationships([FromUri] string externalClientId) { Models.DTO <VisaCheckOut.Models.VisaCheckoutOutputs.RelationshipManagementOut.GetRelationshipsDTO> dto = new Models.DTO <VisaCheckOut.Models.VisaCheckoutOutputs.RelationshipManagementOut.GetRelationshipsDTO>(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inps = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inps.UserId = useriD; inps.RoleName = currentRoles; try { dto = relarionship.GetRelationships(externalClientId); } catch (Exception ex) { } return(Ok(dto)); }
public async Task <IHttpActionResult> UpdateClientProfile([FromUri] string externalClientId, [FromUri] string externalProfileId, VisaCheckOut.Models.VisaCheckoutInputs.ClientProfileManagementInp.UpdateClientProfileInp inp) { Models.DTO <VisaCheckOut.Models.VisaCheckoutOutputs.ClientProfileManagementOut.UpdateClientProfileDTO> dto = new Models.DTO <Models.VisaCheckoutOutputs.ClientProfileManagementOut.UpdateClientProfileDTO>(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inps = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inps.UserId = useriD; inps.RoleName = currentRoles; try { if (inp != null) { dto = usermgt.UpdateClientProfile(externalClientId, externalProfileId, inp); } } catch (Exception ex) { } return(Ok(dto)); }
public async Task <IHttpActionResult> Getallmerchantsdropdown() { List <VisaCheckOut.Models.VisaCheckoutOutputs.RelationshipManagementOut.GetMerchantsDrpdnDTO> dto = new List <Models.VisaCheckoutOutputs.RelationshipManagementOut.GetMerchantsDrpdnDTO>(); try { VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inp = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); // string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); //var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); //inp.UserId = useriD; //inp.RoleName = currentRoles; dto = relarionship.Getallmerchantsdropdown(inp); } catch (Exception ex) { } return(Ok(dto)); }
public async Task <IHttpActionResult> DeleteClientProfile([FromUri] string externalClientId, [FromUri] string externalProfileId) { string status = ""; VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inps = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inps.UserId = useriD; inps.RoleName = currentRoles; try { status = usermgt.DeleteClientProfile(externalClientId, externalProfileId); } catch (Exception ex) { } return(Ok(status)); }
public async Task <IHttpActionResult> GetClientProfiles([FromUri] string externalClientId) { VisaCheckOut.Models.DTO <VisaCheckOut.Models.VisaCheckoutOutputs.ClientProfileManagementOut.GetClientProfilesDTO> dto = new Models.DTO <Models.VisaCheckoutOutputs.ClientProfileManagementOut.GetClientProfilesDTO>(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inp = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inp.UserId = useriD; inp.RoleName = currentRoles; try { dto = usermgt.GetClientProfiles(externalClientId); } catch (Exception ex) { } return(Ok(dto.response.profiles.OrderByDescending(a => a.created))); }
public async Task <IHttpActionResult> CreateClientAPIKey([FromUri] string externalClientId) { Models.DTO <Models.VisaCheckoutOutputs.KeyManagementOut.ClientAPIKeyDTO> capikeys = new Models.DTO <Models.VisaCheckoutOutputs.KeyManagementOut.ClientAPIKeyDTO>(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inp = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inp.UserId = useriD; inp.RoleName = currentRoles; try { capikeys = keymgt.CreateClientAPIKey(externalClientId); } catch (Exception ex) { } return(Ok(capikeys)); }
public async Task <IHttpActionResult> UpdateUser([FromUri] string username, VisaCheckOut.Models.VisaCheckoutInputs.UserManagementInp.CreateUserInp inp) { Models.DTO <VisaCheckOut.Models.VisaCheckoutOutputs.UserManagementOut.CreateUserDTO> res = new Models.DTO <Models.VisaCheckoutOutputs.UserManagementOut.CreateUserDTO>(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inps = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inps.UserId = useriD; inps.RoleName = currentRoles; try { res = usermgt.UpdateUser(username, inp); } catch (Exception ex) { } return(Ok(res)); }
public async Task <IHttpActionResult> UpdatePaymentInfo([FromUri] string Callid, [FromBody] UpdatePaymentInformationInp inp) { string status = ""; VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inps = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inps.UserId = useriD; inps.RoleName = currentRoles; try { status = updatepaymentinfo.UpdatePaymentInfo(inp, Callid); if (status != null) { status = "OK"; } } catch (Exception ex) { } return(Ok(status)); }
public async Task <IHttpActionResult> UpdateAPIKey([FromUri] string apikey, [FromBody] VisaCheckOut.Models.VisaCheckoutInputs.KeyManagementInp.UpdateAPIKeyInp inps) { Models.DTO <VisaCheckOut.Models.VisaCheckoutOutputs.KeyManagementOut.UpdateAPIKeyDTO> dto = new Models.DTO <Models.VisaCheckoutOutputs.KeyManagementOut.UpdateAPIKeyDTO>(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inp = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inp.UserId = useriD; inp.RoleName = currentRoles; try { dto = keymgt.UpdateAPIKey(apikey, inps); } catch (Exception ex) { } return(Ok(dto)); }
public async Task <IHttpActionResult> DeleteAPIKey([FromUri] string apikey) { VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inp = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inp.UserId = useriD; inp.RoleName = currentRoles; string status = ""; try { status = keymgt.DeleteAPIKey(apikey); } catch (Exception ex) { } return(Ok(status)); }
public async Task <IHttpActionResult> GetAllProfiles() { Models.DTO <VisaCheckOut.Models.VisaCheckoutOutputs.ProfileManagementOut.GetAllProfilesDTO> res = new Models.DTO <Models.VisaCheckoutOutputs.ProfileManagementOut.GetAllProfilesDTO>(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inp = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inp.UserId = useriD; inp.RoleName = currentRoles; try { res = profilemgt.GetAllProfiles(); } catch (Exception ex) { } return(Ok(res)); }
public async Task <IHttpActionResult> Gettransactiondata() { Models.DTO <List <VisaCheckOut.Models.VisaCheckoutOutputs.GetPaymentDataOut.TransactionDTO> > dto = new Models.DTO <List <Models.VisaCheckoutOutputs.GetPaymentDataOut.TransactionDTO> >(); VisaCheckOut.Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput inp = new Models.VisaCheckoutInputs.RelationshipManagementInp.UserInput(); string useriD = System.Web.HttpContext.Current.User.Identity.GetUserId(); var currentRoles = await this.AppUserManager.GetRolesAsync(useriD); inp.UserId = useriD; inp.RoleName = currentRoles; try { dto = paymentdata.Gettransactiondata(inp); } catch (Exception ex) { } return(Ok(dto)); }