public void GetHeaderMapCertificate() { credential = credentialMngr.GetCredentials(ConfigManager.Instance.GetProperties(), Constants.CertificateAPIUserName); soapHandler = new MerchantAPICallPreHandler(ConfigManager.Instance.GetProperties(), defaultSoapHandler, credential); Dictionary <string, string> headers = soapHandler.GetHeaderMap(); Assert.IsNotNull(headers); Assert.IsTrue(headers.Count > 0); Assert.AreEqual(Constants.CertificateAPIUserName, headers[BaseConstants.PayPalSecurityUserIdHeader]); Assert.AreEqual(Constants.CertificateAPIPassword, headers[BaseConstants.PayPalSecurityPasswordHeader]); Assert.AreEqual(BaseConstants.SOAP, headers[BaseConstants.PayPalRequestDataFormatHeader]); Assert.AreEqual(BaseConstants.SOAP, headers[BaseConstants.PayPalResponseDataFormatHeader]); Assert.AreEqual(soapHandler.SDKName + "-" + soapHandler.SDKVersion, headers[BaseConstants.PayPalRequestSourceHeader]); }
public void GetHeaderMapCertificate() { credential = credentialMngr.GetCredentials(ConfigManager.Instance.GetProperties(), UnitTestConstants.CertificateAPIUserName); soapHandler = new MerchantAPICallPreHandler(ConfigManager.Instance.GetProperties(), defaultSoapHandler, credential); Dictionary <String, String> headers = soapHandler.GetHeaderMap(); Assert.IsNotNull(headers); Assert.IsTrue(headers.Count > 0); Assert.AreEqual(UnitTestConstants.CertificateAPIUserName, headers[BaseConstants.PAYPAL_SECURITY_USERID_HEADER]); Assert.AreEqual(UnitTestConstants.CertificateAPIPassword, headers[BaseConstants.PAYPAL_SECURITY_PASSWORD_HEADER]); Assert.AreEqual(BaseConstants.SOAP, headers[BaseConstants.PAYPAL_REQUEST_DATA_FORMAT_HEADER]); Assert.AreEqual(BaseConstants.SOAP, headers[BaseConstants.PAYPAL_RESPONSE_DATA_FORMAT_HEADER]); Assert.AreEqual(soapHandler.SDKName + "-" + soapHandler.SDKVersion, headers[BaseConstants.PAYPAL_REQUEST_SOURCE_HEADER]); }
public void GetHeaderMapSignature() { credential = credentialMngr.GetCredentials(ConfigManager.Instance.GetProperties(), Constants.APIUserName); soapHandler = new MerchantAPICallPreHandler(ConfigManager.Instance.GetProperties(), defaultSoapHandler, credential); Dictionary<string, string> headers = soapHandler.GetHeaderMap(); Assert.IsNotNull(headers); Assert.IsTrue(headers.Count > 0); Assert.AreEqual(Constants.APIUserName, headers[BaseConstants.PayPalSecurityUserIdHeader]); Assert.AreEqual(Constants.APIPassword, headers[BaseConstants.PayPalSecurityPasswordHeader]); Assert.AreEqual(Constants.APISignature, headers[BaseConstants.PayPalSecuritySignatureHeader]); Assert.AreEqual(BaseConstants.SOAP, headers[BaseConstants.PayPalRequestDataFormatHeader]); Assert.AreEqual(BaseConstants.SOAP, headers[BaseConstants.PayPalResponseDataFormatHeader]); }