Direct booking process
Starting a direct booking process
Clients like to use booking live for making a booking from within another system / process. This can be achieved with the following process :
- Create a link with security hash string that indicates the user details and the product to book, also the return URL.
- Direct to this URL
- Booking Live validates the hash string and finds or creates the purchaser/particiant with the details passed
- User is shown the booking page and selects date and time
- Basket page open to confirm the selection
- After clicking checkout in basket page the order is finished confirmation email will be sent;
- User will be redirected to op_redirecturlsuccess with all op parameters as get variables.
The following GET/POST variables are required for the link to redirect:
- firstname (required)
- surname (required)
- email (required)
- productid - the product that they are to book. It is not required but if not passed a page in the system called product with product widget need to be created.
- eventid - the event thet they are going to book on to. It is not required but if it is passed then the booking page will load with this event pre-selected.
- adminnote - add special note to the order
- op_redirecturl_success - the URL to return the user to upon success (required)
- op_redirecturl_cancel - the URL to return the user to upon cancellation
- hash (required)
Note: All parameters starting with op_ will be added to the order and then sent to the success URL as parameters, which can be retrieved later by the API.
In this first example we will examine in detail how to build the request string and the issues that might be encountered.
In later examples this will be assumed to have been learned.
First you need to enter your secret key and choose the encrypt method in Admin -> Settings -> API section.
After we set secret key and choose encrypt method we need to build the required "get" string and url encode it.
productid=1 title=Mr firstname=Test surname=User firstname.lastname@example.org op_redirecturl_success=http://www.success.com/ op_redirecturl_cancel=http://cancel.com/</pre><pre contenteditable="false">?productid=1&title=Mr&firstname=Test&surname=Useremail@example.com&op_redirecturl_success=http://www.success.com/&op_redirecturl_cancel=http://cancel.com/
Example of how the GET request should look like:
if 'Skip Billing Page' is enabled the user will not be asked to enter participant information, this will be recorded as purchaser and participant with the same person