當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。