本文整理匯總了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);
}