private eWayCustomer SetupCustomer() { var obj = new eWayCustomer { eWAYCustomerID = "eWay sndbox customer ID", Username = "******", Password = "******", customerTitle = "Mr", customerFirstName = "testRecuring", customerLastName = "cybera", customerAddress = "Netstudio", customerSuburb = "Berwick", customerState = "VIC", customerCompany = "Cybera", customerPostCode = "3061", customerCountry = "Australia", customerEmail = "*****@*****.**", customerFax = "0298989898", customerPhone1 = "0297979797", customerRef = "cus123", customerComments = "Hello eWay!", customerURL = "https://www.cybera.com.au" }; return(obj); }
private string CreateCustomerSoapEnv(eWayCustomer cus) { string rebillStr = @"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"; rebillStr += @"<soap:Header>"; rebillStr += @"<eWAYHeader xmlns=""http://www.eway.com.au/gateway/rebill/manageRebill"">"; rebillStr += @"<eWAYCustomerID>" + cus.eWAYCustomerID + @"</eWAYCustomerID>"; rebillStr += @"<Username>" + cus.Username + "</Username>"; rebillStr += @"<Password>" + cus.Password + "</Password>"; rebillStr += @"</eWAYHeader>"; rebillStr += @"</soap:Header>"; rebillStr += @"<soap:Body>"; rebillStr += @"<CreateRebillCustomer xmlns=""http://www.eway.com.au/gateway/rebill/manageRebill"">"; rebillStr += @"<customerTitle>" + cus.customerTitle + "</customerTitle>"; rebillStr += @"<customerFirstName>" + cus.customerFirstName + "</customerFirstName>"; rebillStr += @"<customerLastName>" + cus.customerLastName + "</customerLastName>"; rebillStr += @"<customerAddress>" + cus.customerAddress + "</customerAddress>"; rebillStr += @"<customerSuburb>" + cus.customerSuburb + "</customerSuburb>"; rebillStr += @"<customerState>" + cus.customerState + "</customerState>"; rebillStr += @"<customerCompany>" + cus.customerCompany + "</customerCompany>"; rebillStr += @"<customerPostCode>" + cus.customerPostCode + "</customerPostCode>"; rebillStr += @"<customerCountry>" + cus.customerCountry + "</customerCountry>"; rebillStr += @"<customerEmail>" + cus.customerEmail + "</customerEmail>"; rebillStr += @"<customerFax>" + cus.customerFax + "</customerFax>"; rebillStr += @"<customerPhone1>" + cus.customerPhone1 + "</customerPhone1>"; rebillStr += @"<customerPhone2/>"; rebillStr += @"<customerRef>" + cus.customerRef + "</customerRef>"; rebillStr += @"<customerJobDesc/>"; rebillStr += @"<customerComments>" + cus.customerComments + "</customerComments>"; rebillStr += @"<customerURL>" + cus.customerURL + "</customerURL>"; rebillStr += @"</CreateRebillCustomer>"; rebillStr += @"</soap:Body>"; rebillStr += @"</soap:Envelope>"; return(rebillStr); }