Пример #1
0
        public static LocationResult ParseLocationResult(HtmlDocument doc, PayByPhoneApi api)
        {
            var form = doc.DocumentNode.SelectSingleNode("//form");
            var formAction = form?.GetAttributeValue("action", "");

            LocationResult result = null;

            if (formAction != null)
            {
                if (formAction.Contains("ChooseLocation"))
                {
                    // this is a multiple response
                    result = new MultipleLocationResult(api);
                    var mlResult = result as MultipleLocationResult;
                    mlResult.Locations = DifferentiateResultLocation.ParseLocations(doc.DocumentNode);
                }
                else
                {
                    // this is on Parking
                    result = new SingleLocationResult();
                    var slResult = result as SingleLocationResult;
                    slResult.Location = new ResultLocation(doc.DocumentNode);
                }
            }
            return result;
        }
Пример #2
0
        private async void Login()
        {   
            bool val;
            _api = new PayByPhoneApi();
            await _api.Login("7202564696", "2343");
            return;
            do
            {
                Console.WriteLine("Login to PayByPhone");
                Console.Write("\tUsername: "******"\tPassword: "******"Error Logging In");
                }
            }
            while (!val);
            Console.WriteLine("Logged in");
        }
Пример #3
0
 public ApiSection(PayByPhoneApi api)
 {
     MyApi = api;
 }
Пример #4
0
 public EmailSettings(PayByPhoneApi api) : base(api)
  {
  }
Пример #5
0
 public MultipleLocationResult(PayByPhoneApi api)
 {
     _api = api;
 }
Пример #6
0
 public TermsConditions(PayByPhoneApi api) : base(api)
  {
  }        
Пример #7
0
 public LocationManager(PayByPhoneApi api) : base(api)
 {
 }
Пример #8
0
 public PaymentDetails(PayByPhoneApi api) : base(api)
  {
  }