node-takeaway icon indicating copy to clipboard operation
node-takeaway copied to clipboard

Add order placement

Open DanielleHuisman opened this issue 4 years ago • 4 comments

DanielleHuisman avatar Nov 23 '19 20:11 DanielleHuisman

This library might be exactly what I've been looking for. Are you still working on it? Any word from takeaway if they're happy with this? 😄

RWOverdijk avatar May 19 '20 09:05 RWOverdijk

@RWOverdijk I occasionally work on this library, but it's not a high priority since I'm currently not using it in any projects.

I would like to finish implementing the order functionality, but it is somewhat difficult without an example request. I tried using an packet capture app for Android (which works with a local VPN), but this was unsuccessful. It might be possible on a rooted device, but my phone currently isn't. Last time I checked it there weren't any good ways to gain root for my device. So the only way to obtain information about the order request is from reading the deobfuscated Android app.

Any help on the project is obviously welcome!

DanielleHuisman avatar May 20 '20 19:05 DanielleHuisman

Aah I misunderstood, this API is from the consumer side, not the restaurants. Still interesting though. I might take a look later and see what I can do 😄

RWOverdijk avatar May 21 '20 08:05 RWOverdijk

I ordered from TakeAway (actually Lieferando in my country) today, and I recorded the request through a mitm proxy. Was just a simple order, without adding any notes, ordering special ingredients or things like that, so there are a couple empty fields.

var0: md5 hash
var1: placeorder
var2: empty
var3: Full Name
var4: Empty
var5: street address
var6: empty
var7: postal code
var8: city
var9: phone number
var10: e-mail address
var11: empty
var12: empty
var13: empty
var14: unsure, value was 0
var15: restaurant ID
var16: product IDs, seperated by a semicolon (with a trailing one at the end, eg when buying same item twice: "ID12345;ID12345;")
var17: unsure, value was 52
var18: language
var19: unsure, value was 5
var20: empty
var21: unsure, value was 0
var22: empty
var23: empty
var24: postal code
var25: app ID (in my case: at.lieferservice.android)
var26: additional infos, in my case: {"companyname" : "","entrance" : "","stock" : "","door" : ""}
var27: empty
var28: empty
var29: empty
var30: unsure, value was 0
var31: unsure, value was 0
var32: empty
var33: latitude (seems to be the location that has been searched for (or your location when using GPS I guess))
var34: longitude
var35: again product IDs, this time formatted as json, e.g. [{"product":"ID12345"},{"product":"ID12345"}]
var36: unsure, value was 1
var37: seems to be a unique identifier, probably got generated when launching the app for the first time or something (didn't get transmitted in any other request), format was xxxx-xxxx_xxxxxxxxxxxxxxxxx, where x can be a character (either upper or lower case) or a number
var38: empty
var39: empty
var40: empty
var41: empty

Hanouta avatar Dec 07 '20 23:12 Hanouta