简体   繁体   中英

How do i pass additional parameters in an uber surge request process?

When i make a cab request to uber using API calls, I send the Surge confirmation url to the client. The client clicks on the URL and accepts the higher fares. Uber then redirects me to my page with a surge confirmation id and the process is complete.

This scenario works well with a single user.

However, if there are multiple users involved in the same process, i cannot keep track of the users, as uber only returns me surge_confirmation_id as a parameter.

I tried adding additional parameters in the request url to the user, but when it redirects, it only returns the surge_confirmation_id.

Kindly help. Regards,

Hitesh Suvarna

After thinking over a couple ways to try this, I think your best bet is whenever you create a rides request for a specific user, but before you send the surge confirmation url to the client, you need to store the surge confirmation url as a key with the value being the user's ID. That way whenever you get the surge confirmation id from the redirect, you can just look it up in your dictionary to see who the user associated with it is.

Let me know if this isn't entirely feasible and I'll keep contemplating some other ways to try this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM