Ejemplo n.º 1
0
        private CallcreditBsbAndCreditReport InitializeApiProxy()
        {
            /* Create a new proxy object which represents the Callcredit API. */
            CallcreditBsbAndCreditReport apiProxy = new CallcreditBsbAndCreditReport();

            /* We can alter the proxy URL here, if necessary. */
            /* TODO: Select Appropriate URL - either Client Test Site or Live Site */
            //apiProxy.Url = "https://www.callcreditsecure.co.uk/Services/BSB/CRBSB7.asmx";	//Live Site URL
            apiProxy.Url = "https://ct.callcreditsecure.co.uk/Services/BSB/CRBSB7.asmx";        //Client Test Site URL

            /* Create a new callcreditheaders object and attach it to the proxy object. */
            /* TODO: Setup User Credentials (provided by Callcredit Professional Services) */
            callcreditheaders apiCredentials = new callcreditheaders();

            apiCredentials.company          = companyName;
            apiCredentials.username         = userName;
            apiCredentials.password         = password;
            apiProxy.callcreditheadersValue = apiCredentials;

            return(apiProxy);
        }
Ejemplo n.º 2
0
        private static CallcreditBsbAndCreditReport InitializeApiProxy()
        {
            /* Create a new proxy object which represents the Callcredit API. */
            CallcreditBsbAndCreditReport apiProxy = new CallcreditBsbAndCreditReport();

            /* We can alter the proxy URL here, if necessary. */
            /* Select Appropriate URL - either Client Test Site or Live Site */
            // "https://www.callcreditsecure.co.uk/Services/BSB/CRBSB7.asmx";	//Live Site URL
            // "https://ct.callcreditsecure.co.uk/Services/BSB/CRBSB7.asmx";	//Client Test Site URL
            apiProxy.Url = ConfigManager.CurrentValues.Instance.CallCreditUrl;

            /* Create a new callcreditheaders object and attach it to the proxy object. */

            callcreditheaders apiCredentials = new callcreditheaders();

            apiCredentials.company          = ConfigManager.CurrentValues.Instance.CallCreditUserCompany;
            apiCredentials.username         = ConfigManager.CurrentValues.Instance.CallCreditUserName;
            apiCredentials.password         = ConfigManager.CurrentValues.Instance.CallCreditPassword;
            apiProxy.callcreditheadersValue = apiCredentials;

            return(apiProxy);
        }