Web-Based Order Ahead¶
Important: web applications must allow for a "guest checkout" experience to support web-based order ahead.
Ideally each site for a merchant should have a unique URL, for example:
This improves the user experience for the customer by not having to reselect the site/location when the begin an order ahead flow.
In order to process a payment the web application needs to determine the Aston Club merchant ID. There are two methods for this:
- Pass the ID as a querystring param, for example:
https://orderahead.com/merchant_x/site_y?aston=507f1f77bcf86cd799439011. In order for this to function correctly, the web application must prevent the user from browsing/selecting other stores/sites since this ID is tied to a specific store. If this cannot be prevented try options 2 or 3.
- Maintain a mapping of stores to Aston IDs locally in the order ahead application.
- Configure the local order ahead ID for each store in LOKE's back end, then use
orderStoreIdin the payment call, instead of
merchantId. This is the least preferred option as it introduces an extra configuration point for each store, and also introduces an element of brittleness and poor UX where a configuration error will not occur until a customer reaches the final stages of an order (if the mapping is not configured).