本文整理汇总了C#中PayPal.SOAP.MerchantAPICallPreHandler.GetPayLoad方法的典型用法代码示例。如果您正苦于以下问题:C# MerchantAPICallPreHandler.GetPayLoad方法的具体用法?C# MerchantAPICallPreHandler.GetPayLoad怎么用?C# MerchantAPICallPreHandler.GetPayLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PayPal.SOAP.MerchantAPICallPreHandler
的用法示例。
在下文中一共展示了MerchantAPICallPreHandler.GetPayLoad方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPayLoadForCertificate
public void GetPayLoadForCertificate()
{
credential = credentialMngr.GetCredentials(UnitTestConstants.CertificateAPIUserName);
soapHandler = new MerchantAPICallPreHandler(defaultSoapHandler, credential);
string payload = soapHandler.GetPayLoad();
XmlDocument xmlDoc = GetXmlDocument(payload);
XmlNodeList xmlNodeListUsername = xmlDoc.GetElementsByTagName("Username");
Assert.IsTrue(xmlNodeListUsername.Count > 0);
Assert.AreEqual(UnitTestConstants.CertificateAPIUserName, xmlNodeListUsername[0].InnerXml);
XmlNodeList xmlNodeListPassword = xmlDoc.GetElementsByTagName("Password");
Assert.IsTrue(xmlNodeListPassword.Count > 0);
Assert.AreEqual(UnitTestConstants.CertificateAPIPassword, xmlNodeListPassword[0].InnerXml);
XmlNodeList xmlNodeListRequest = xmlDoc.GetElementsByTagName("Request");
Assert.IsTrue(xmlNodeListRequest.Count > 0);
Assert.AreEqual("test", xmlNodeListRequest[0].InnerXml);
}
示例2: GetPayLoadSignature
public void GetPayLoadSignature()
{
credential = credentialMngr.GetCredentials(ConfigManager.Instance.GetProperties(), UnitTestConstants.APIUserName);
soapHandler = new MerchantAPICallPreHandler(ConfigManager.Instance.GetProperties(), defaultSoapHandler, credential);
string payload = soapHandler.GetPayLoad();
XmlDocument xmlDoc = GetXmlDocument(payload);
XmlNodeList xmlNodeListUsername = xmlDoc.GetElementsByTagName("Username");
Assert.IsTrue(xmlNodeListUsername.Count > 0);
Assert.AreEqual(UnitTestConstants.APIUserName, xmlNodeListUsername[0].InnerXml);
XmlNodeList xmlNodeListPassword = xmlDoc.GetElementsByTagName("Password");
Assert.IsTrue(xmlNodeListPassword.Count > 0);
Assert.AreEqual(UnitTestConstants.APIPassword, xmlNodeListPassword[0].InnerXml);
XmlNodeList xmlNodeListSignature = xmlDoc.GetElementsByTagName("Signature");
Assert.IsTrue(xmlNodeListSignature.Count > 0);
Assert.AreEqual(UnitTestConstants.APISignature, xmlNodeListSignature[0].InnerXml);
XmlNodeList xmlNodeListRequest = xmlDoc.GetElementsByTagName("Request");
Assert.IsTrue(xmlNodeListRequest.Count > 0);
Assert.AreEqual("test", xmlNodeListRequest[0].InnerXml);
}