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