2

I want to create an app for faster payment of parking.

This question is more about logic of my app, and what tools I need to use about creating it.

At this point, I use a parking place every day and I pay for it through the web page.

I do it like this.

  1. Login to page.
  2. click on the menu and it redirects me to www.parkingexample.page/payments
  3. there is a search menu and I enter my car plate number if my car is found it returns me how much I need to pay, and "Pay" Button appears.
  4. I click "Pay" buttons and then it's all done.

So my goal is to create an app that when I start it will automatically connect to the page and will search for my plate and if found and payment is needed there would be just one button "Pay"

So I think I should do it like this, but as I haven't created any web app(I'm 100% back-end developer) I ask you is my thought process is correct.

And also I don't want to use WebView as I think it's not necessary for me.

  1. When I start my app it sends "POST" request to page to login.
  2. Then I send 'GET' request to www.parkingexample.page/payments with params = 'mycarspaltenumber'
  3. Somehow I need to click on PAY button on page when it appears so I think it's probably again 'POST' request, but at this point, I'm not sure.

So a QUESTION is, is my logic valid? or it can be done in some other way?

UPDATE. ADDED SCREENSHOTS

  1. First Screen shoot this is the menu after I logged in with the search bar where I need to enter my card plate.

enter image description here

  1. Second screen is where I found my car(Entered plate number and clicked search) and now the page is updated with sum I have to pay and there is a button "PAID" in the bottom right corner I need to click. And that's all i need.

enter image description here

Chaban33
  • 1,362
  • 11
  • 38
  • 1
    basically you want to use the api's of the parking system and use it for your own faster checkouts right? – Gaurav Roy Dec 16 '19 at 09:43
  • 1
    @GauravRoy yeh I want to replicate everything I'm doing trough my browser every day, "Opening it, log in into the page, search for car plate, make payment" with 2 clicks. 1. Open App on Mobile, 2, Click payment button in-app – Chaban33 Dec 16 '19 at 09:50
  • 1
    you need to study their api's first , coz mostly payment will be the tricky one. – Gaurav Roy Dec 16 '19 at 09:57
  • 1
    @GauravRoy I don't get charged every day, actually when I log in the system and click 'PAID' it just adds those payments every day to my account and when the months end I just get an invoice. I added screenshots with al process . – Chaban33 Dec 16 '19 at 10:33
  • 1
    @GauravRoy and the other thing. They don't have any kind of API created, so it just needs to be an emulation of what I'm doing in browser with my keyboard and mouse basically. – Chaban33 Dec 16 '19 at 10:39
  • 1
    My question is about the necessity of using the second screen, you will need it for what exactly, if the main focus of your application is to pay? – BackToReal Dec 24 '19 at 09:44
  • @BackToReal, can you elaborate what u mean? The goal of app is just to pay from mobile app with few click , and don't login to thr webpage – Chaban33 Dec 24 '19 at 12:37
  • I didn't mean you don't have to log to the app, I mean if you ask the question: Why I have to display the picture( in second screen)of the car's registration number? Maybe you need the emplacement, it would be better to have another ability for that – BackToReal Dec 26 '19 at 09:09
  • @BackToReal you don't, i just showed how it works on the webpage – Chaban33 Dec 26 '19 at 09:23

2 Answers2

4

To validate whether your suggested sequence is correct I would start by capturing your typical browser session between yourself and your parking provider with something like Fiddler. Then I would use HTTP client library of choice (for C# it would be something like HttpClient) and emulate the same flow with correct headers, query parameters and such like.

Looknig at your screenshots it seems the application is ASP.NET Web Forms, which can get a bit painful to emulate due to way its state management works: you will likely need to decode View state object (to ensure you're passing it back correctly) and locate all dynamic field ids that it uses for postbacks. This however is very doable.

If you discover that the above is too hard to emulate (or there's javascript involved) it might be easier to explore Remote Selenium WebDriver coupled with a headless browser like PhantomJS. You'd then have your PhantomJS interact with the page on your server, and you'll drive it with your mobile app. Basically you'll reduce the complexity of your parking provider page to a well documented API.

Hopefully that gives you a starting point

timur
  • 14,239
  • 2
  • 11
  • 32
3

In your application, all that you will need is services call and the security part of logging a new user everytime to check for payment. So It will be a simple spring-boot application, where you can use the security part for logging, and you can exactly use the simple way , for example you don't need to have a database, just to redirect your page, and if you are not familiar to front-end framework, you can use a basic html-css pages for client side.

Another important point, you should start by designing your application, before coding, because it's very important to know all the ideas behind your application.

Enjoy your doing time!

BackToReal
  • 143
  • 1
  • 5
  • 15