當前位置: 首頁>>代碼示例>>C#>>正文


C# MerchantAPICallPreHandler.GetEndpoint方法代碼示例

本文整理匯總了C#中PayPal.SOAP.MerchantAPICallPreHandler.GetEndpoint方法的典型用法代碼示例。如果您正苦於以下問題:C# MerchantAPICallPreHandler.GetEndpoint方法的具體用法?C# MerchantAPICallPreHandler.GetEndpoint怎麽用?C# MerchantAPICallPreHandler.GetEndpoint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PayPal.SOAP.MerchantAPICallPreHandler的用法示例。


在下文中一共展示了MerchantAPICallPreHandler.GetEndpoint方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetEndpoint

 public void GetEndpoint()
 {
     credential = credentialMngr.GetCredentials(ConfigManager.Instance.GetProperties(), Constants.CertificateAPIUserName);
     MerchantAPICallPreHandler soapHandler = new MerchantAPICallPreHandler(ConfigManager.Instance.GetProperties(), defaultSoapHandler, credential);
     string endpoint = soapHandler.GetEndpoint();
     Assert.AreEqual(Constants.APIEndpointNVP, endpoint);
 }
開發者ID:nayosx,項目名稱:sdk-core-dotnet,代碼行數:7,代碼來源:MerchantAPICallPreHandlerTest.cs

示例2: GetEndpointForDefaultModeWithoutEndpoint

        public void GetEndpointForDefaultModeWithoutEndpoint()
        {
            Dictionary<string, string> config = new Dictionary<string, string>(accountConfig);

            credential = credentialMngr.GetCredentials(config, Constants.CertificateAPIUserName);
            MerchantAPICallPreHandler soapHandler = new MerchantAPICallPreHandler(config, defaultSoapHandler, credential);
            soapHandler.GetEndpoint();
        }
開發者ID:NikolayGlynchak,項目名稱:sdk-core-dotnet,代碼行數:8,代碼來源:MerchantAPICallPreHandlerTest.cs

示例3: GetEndpointForDefaultModeWithExplicitEndpoint

        public void GetEndpointForDefaultModeWithExplicitEndpoint()
        {
            Dictionary<string, string> config = new Dictionary<string, string>(accountConfig);
            config.Add(BaseConstants.EndpointConfig, Constants.APIEndpointNVP);

            credential = credentialMngr.GetCredentials(config, Constants.CertificateAPIUserName);
            MerchantAPICallPreHandler soapHandler = new MerchantAPICallPreHandler(config, defaultSoapHandler, credential);
            Assert.AreEqual(Constants.APIEndpointNVP, soapHandler.GetEndpoint());

            config.Add("PayPalAPI", Constants.APIEndpointSOAP);
            credential = credentialMngr.GetCredentials(config, Constants.CertificateAPIUserName);
            soapHandler = new MerchantAPICallPreHandler(config, defaultSoapHandler, credential);
            soapHandler.PortName = "PayPalAPI";
            Assert.AreEqual(Constants.APIEndpointSOAP, soapHandler.GetEndpoint());
        }
開發者ID:nayosx,項目名稱:sdk-core-dotnet,代碼行數:15,代碼來源:MerchantAPICallPreHandlerTest.cs

示例4: GetEndpointForLiveMode

        public void GetEndpointForLiveMode()
        {
            Dictionary<string, string> config = new Dictionary<string, string>(accountConfig);
            config.Add(BaseConstants.ApplicationModeConfig, BaseConstants.SandboxMode);

            credential = credentialMngr.GetCredentials(config, Constants.CertificateAPIUserName);
            MerchantAPICallPreHandler soapHandler = new MerchantAPICallPreHandler(config, defaultSoapHandler, credential);
            Assert.AreEqual(BaseConstants.MerchantCertificateSandboxEndpoint, soapHandler.GetEndpoint());

            credential = credentialMngr.GetCredentials(config, Constants.APIUserName);
            soapHandler = new MerchantAPICallPreHandler(config, defaultSoapHandler, credential);
            Assert.AreEqual(BaseConstants.MerchantSignatureSandboxEndpoint, soapHandler.GetEndpoint());
        }
開發者ID:nayosx,項目名稱:sdk-core-dotnet,代碼行數:13,代碼來源:MerchantAPICallPreHandlerTest.cs


注:本文中的PayPal.SOAP.MerchantAPICallPreHandler.GetEndpoint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。