Exemplo n.º 1
0
        public static string Pay(CarsCheckpoint.Models.User user, int price)
        {
            var payment = new Payment()
            {
                PayUser = user, Sum = price
            };

            using (var client = new HttpClient())
            {
                var response = client.PostAsJsonAsync($"{APP_PATH}/Pay", payment).Result;
                return(response.StatusCode.ToString());
            }
        }
Exemplo n.º 2
0
        public static string AddCardToUser(CarsCheckpoint.Models.User user, string cardId)
        {
            var allAboutUser = new AllUserData()
            {
                Card = new RFIDCard()
                {
                    CardId = cardId
                },
                User = user
            };

            using (var client = new HttpClient())
            {
                var response = client.PostAsJsonAsync($"{APP_PATH}/AddCard", allAboutUser).Result;
                return(response.StatusCode.ToString());
            }
        }