本文整理汇总了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);
}
示例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();
}
示例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());
}
示例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());
}