/// <summary>
        /// Returns default HTTP headers used in SOAP call
        /// </summary>
        /// <returns></returns>
        private Dictionary <string, string> GetDefaultHttpHeadersSOAP()
        {
            Dictionary <string, string> returnMap = new Dictionary <string, string>();

            returnMap.Add(BaseConstants.PayPalRequestDataFormatHeader, BaseConstants.SOAP);
            returnMap.Add(BaseConstants.PayPalResponseDataFormatHeader, BaseConstants.SOAP);
            returnMap.Add(BaseConstants.PayPalRequestSourceHeader, SDKName + "-" + SDKVersion);
            SDKUtil.AddUserAgentToHeader(returnMap, SDKName, SDKVersion);
            return(returnMap);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns the Default Http Headers NVP
        /// </summary>
        /// <returns></returns>
        private Dictionary <string, string> GetDefaultHttpHeadersNVP()
        {
            Dictionary <string, string> returnMap = new Dictionary <string, string>();

            try
            {
                returnMap.Add(BaseConstants.PayPalApplicationIdHeader, GetApplicationId());
                returnMap.Add(BaseConstants.PayPalRequestDataFormatHeader, BaseConstants.NVP);
                returnMap.Add(BaseConstants.PayPalResponseDataFormatHeader, BaseConstants.NVP);
                returnMap.Add(BaseConstants.PayPalRequestSourceHeader, SDKName + "-" + SDKVersion);
                returnMap.Add(BaseConstants.PayPalSandboxEmailAddressHeader, GetSandboxEmailAddress());
                returnMap.Add(BaseConstants.PayPalSandboxDeviceIPAddress, GetDeviceIPAddress());
                SDKUtil.AddUserAgentToHeader(returnMap, SDKName, SDKVersion);
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
            return(returnMap);
        }