当前位置: 首页>>代码示例>>C#>>正文


C# MerchantAPICallPreHandler.GetPayLoad方法代码示例

本文整理汇总了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);
 }
开发者ID:israelgoldstein,项目名称:sdk-core-dotnet,代码行数:16,代码来源:MerchantAPICallPreHandlerTest.cs

示例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);
 }
开发者ID:Rogreis,项目名称:sdk-core-dotnet,代码行数:19,代码来源:MerchantAPICallPreHandlerTest.cs


注:本文中的PayPal.SOAP.MerchantAPICallPreHandler.GetPayLoad方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。