private async Task <RHPaymentResponse> SendPaymentDetailsToRH(RectangleHealthCustomer rectangleHealthCustomer, IOptions <AppSettings> appSettings, bool IsUpdateCustomer) { using (var client = new HttpClient()) { string result = ConvertObectToXMLToString(rectangleHealthCustomer, IsUpdateCustomer); var response = await client.PostAsync(appSettings.Value.RHGatewayURL, GetHttpContent(result)); return(FromXml <RHPaymentResponse>(await ReadResponseMessage(response))); } }
public async Task <RHPaymentResponse> AddPaymentDetails(RectangleHealthCustomer rectangleHealthCustomer, IOptions <AppSettings> appSettings, bool isUpdate) { // Make get API call using (var client = new HttpClient()) { string input = ConvertObectToXMLToString(rectangleHealthCustomer, isUpdate); var response = await client.PostAsync(appSettings.Value.RHGatewayURL, GetHttpContent(input)); return(FromXml <RHPaymentResponse>(await ReadResponseMessage(response))); } }