Esempio n. 1
0
        public static bool IsRoomOwnerFriend(string roomId, UserId userId)
        {
            WebServiceRequest getRoomOwnerRelationship = new WebServiceRequest(_ServicesSiteRoot, "Friends", "IsRoomOwnerFriend");

            if (userId != null)
            {
                getRoomOwnerRelationship.AddParam("userId", userId.Id.ToString());
            }
            getRoomOwnerRelationship.AddParam("roomId", roomId);
            XmlDocument serviceResponse = getRoomOwnerRelationship.GetWebResponse();


            XmlNodeList isRoomOwnerFriendNode = serviceResponse.GetElementsByTagName("isRoomOwnerFriend");

            if (isRoomOwnerFriendNode.Count > 0)
            {
                if (isRoomOwnerFriendNode[0] != null)
                {
                    if (Convert.ToBoolean(isRoomOwnerFriendNode[0].InnerText))
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
            }
            return(false);
        }
Esempio n. 2
0
        public XmlDocument GetTheUserInformationFromHangoutId(string hangoutUserId, string baseServicesRoot)
        {
            XmlDocument userInformation = null;

            WebServiceRequest request = new WebServiceRequest(baseServicesRoot, "Accounts", "GetAccounts");

            request.AddParam("accountId", hangoutUserId);
            userInformation = request.GetWebResponse();

            return(userInformation);
        }
        private XmlDocument ProcessCallBack(string xmlInfo, string baseServicesRoot)
        {
            UTF8Encoding encoding = new UTF8Encoding();

            Byte[] byteArray = encoding.GetBytes(xmlInfo);

            WebServiceRequest request = new WebServiceRequest(baseServicesRoot, "PaymentItemsService", "PayPalCallback");

            request.AddParam("xmlInfoBinary", byteArray);

            XmlDocument xmlResponse = request.GetWebResponse();

            return(xmlResponse);
        }
Esempio n. 4
0
        private XmlDocument ProcessAdminPaymentItem(PaymentCommand paymentCommand, string baseServicesRoot)
        {
            ServiceCommandSerializer serializer = new ServiceCommandSerializer();
            string xmlPaymentItemsMessage       = serializer.SerializeCommandData(paymentCommand, typeof(PaymentCommand));

            UTF8Encoding encoding = new UTF8Encoding();

            Byte[] byteArray = encoding.GetBytes(xmlPaymentItemsMessage);

            WebServiceRequest request = new WebServiceRequest(baseServicesRoot, "PaymentItemsService", "ProcessAdminPaymentItemXml");

            request.AddParam("paymentCommand", byteArray);

            XmlDocument xmlResponse = request.GetWebResponse();

            return(xmlResponse);
        }