// <summary> // Function for performing and AVS check // </summary> // <returns> // string // </returns> public string PerformAVSCheck(UserModel user, string token) { // Create Client and Response objects ExpressSoapClient express = new ExpressSoapClient(); Response response = new Response(); // Call Element AVS Setup classes/functions GetAVSConfig(user, token); ExtendedParameters[] arExt = GetExtendedParameters(token); System.Diagnostics.Debug.Write(token); // Generate response response = express.CreditCardAVSOnly(credentials, application, terminal, card, transaction, address, arExt); // Return response return response.Card.AVSResponseCode; }
// <summary> // Function for setting up an Element Transaction environment // </summary> // <returns> // NameValueCollection // </returns> public ElementResponseModel SetupTransaction(UserModel user, string amount, string redirectUrl) { // Create Client and Response objects ExpressSoapClient express = new ExpressSoapClient(); Response response = new Response(); // Call Element Setup classes/functions GetSetupConfig(user, amount, redirectUrl); // Generate and interpret response response = express.TransactionSetup(credentials, application, terminal, transaction, transactionSetup, address, paymentAccount, null); string tsi = response.TransactionSetup.TransactionSetupID; string tempvalcode = response.TransactionSetup.ValidationCode; // Store response data responseCollection = new ElementResponseModel(); responseCollection.TransactionSetupId = tsi.ToString(); responseCollection.ValidationCode = tempvalcode.ToString(); // Return store response data return responseCollection; }
public void Setup() { var binding = new System.ServiceModel.BasicHttpBinding(); binding.Security.Transport.ClientCredentialType = System.ServiceModel.HttpClientCredentialType.None; binding.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport; binding.MaxBufferSize = 2147483647; binding.MaxReceivedMessageSize = 2147483647; var endpoint = new System.ServiceModel.EndpointAddress(@"https://certservices.elementexpress.com/express.asmx"); _proxy = new ExpressSoapClient(binding, endpoint); //BPC UAT integration //creds _acceptorId = "3928907"; _accountId = "1009580"; _accountToken = ""; //app _applicationId = "1331"; _applicationName = "HME Bill Pay"; _applicationVersion = "2.0.0"; }