Пример #1
0
        public async Task <string> GetPaymentStatus(Payment payment)
        {
            PaymentDetails paymentDetails = new PaymentDetails()
            {
                PaymentData = payment.PaymentData
            };

            paymentDetails.AddDetail("redirectResult", payment.RedirectData);
            paymentDetails.AddDetail("MD", payment.MD);
            paymentDetails.AddDetail("PaRes", payment.PaRes);
            string json = JsonConvert.SerializeObject(paymentDetails, _jsonSerializeSettings);
            HttpResponseMessage response = await _httpClient.PostAsync($"payments/details", new StringContent(json));

            return(await response.Content.ReadAsStringAsync());
        }