private string CreateRebillSoapEnv(RebillModel 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 += @"<CreateRebillEvent xmlns=""http://www.eway.com.au/gateway/rebill/manageRebill"">";
            rebillStr += @"<RebillCustomerID>" + cus.RebillCustomerID + "</RebillCustomerID>";
            rebillStr += cus.RebillInvRef != null ? @"<RebillInvRef>" + cus.RebillInvRef + "</RebillInvRef>" : @"<RebillInvRef/>";
            rebillStr += cus.RebillInvRef != null ? @"<RebillInvDes>" + cus.RebillInvDes + "</RebillInvDes>" : @"<RebillInvDes/>";
            rebillStr += @"<RebillCCName>" + cus.RebillCCName + "</RebillCCName>";
            rebillStr += @"<RebillCCNumber>" + cus.RebillCCNumber + "</RebillCCNumber>";
            rebillStr += @"<RebillCCExpMonth>" + cus.RebillCCExpMonth + "</RebillCCExpMonth>";
            rebillStr += @"<RebillCCExpYear>" + cus.RebillCCExpYear + "</RebillCCExpYear>";
            rebillStr += @"<RebillInitAmt>" + cus.RebillInitAmt + "</RebillInitAmt>";
            rebillStr += @"<RebillInitDate>" + cus.RebillInitDate + "</RebillInitDate>";
            rebillStr += @"<RebillRecurAmt>" + cus.RebillRecurAmt + "</RebillRecurAmt>";
            rebillStr += @"<RebillStartDate>" + cus.RebillStartDate + "</RebillStartDate>";
            rebillStr += @"<RebillInterval>" + cus.RebillInterval + "</RebillInterval>";
            rebillStr += @"<RebillIntervalType>" + cus.RebillIntervalType + "</RebillIntervalType>";
            rebillStr += @"<RebillEndDate>" + cus.RebillEndDate + "</RebillEndDate>";
            rebillStr += @"</CreateRebillEvent>";
            rebillStr += @"</soap:Body>";
            rebillStr += @"</soap:Envelope>";

            return(rebillStr);
        }
        private RebillModel SetupRebill()
        {
            var obj = new RebillModel
            {
                eWAYCustomerID     = "eWay sndbox customer ID",
                Username           = "******",
                Password           = "******",
                RebillCustomerID   = "123445",
                RebillCCName       = "testuser cybera",
                RebillCCNumber     = "4444333322221111",
                RebillCCExpMonth   = "09",
                RebillCCExpYear    = "2018",
                RebillInitAmt      = "120",
                RebillInitDate     = DateTime.Now.ToString("dd/MM/yyyy"),
                RebillRecurAmt     = "130",
                RebillStartDate    = DateTime.Now.AddYears(1).ToString("dd/MM/yyyy"),
                RebillInterval     = "30",
                RebillIntervalType = "4",
                RebillEndDate      = DateTime.Now.AddYears(20).ToString("dd/MM/yyyy")
            };

            return(obj);
        }