This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
start [2018/11/28 16:04] 223.207.6.67 |
start [2019/02/26 17:11] 223.207.124.105 |
||
---|---|---|---|
Line 24: | Line 24: | ||
Then you can reproduce an output from JSON data to be a web form or show in data table. A code can write in **PHP Curl** or **JQuery Ajax.** | Then you can reproduce an output from JSON data to be a web form or show in data table. A code can write in **PHP Curl** or **JQuery Ajax.** | ||
+ | |||
__**Method Definition**__ | __**Method Definition**__ | ||
- | **1. GET_PROVINCE_LIST** | + | |
+ | **1. GET_PROVINCE_LIST** | ||
get a province list to do a select box for source and destination. | get a province list to do a select box for source and destination. | ||
+ | |||
parameter: {key}&{method} | parameter: {key}&{method} | ||
- | **2. GET_STATION** | + | |
+ | ** 2. GET_STATION** | ||
after select source or destination province, use this method to get a list of station for source | destination | after select source or destination province, use this method to get a list of station for source | destination | ||
+ | |||
parameter: {key}&{method}&{provinceID}&{type} | parameter: {key}&{method}&{provinceID}&{type} | ||
+ | |||
{type} = source | destination | {type} = source | destination | ||
- | **3. GET_TIME_TABLE** | + | |
+ | **3. GET_TIME_TABLE** | ||
get a list of trip schedule when we know a source | destination station and date | get a list of trip schedule when we know a source | destination station and date | ||
+ | |||
parameter: {key}&{method}&{from}&{to}&{date} | parameter: {key}&{method}&{from}&{to}&{date} | ||
+ | |||
+ | --------------------------------------------------------- | ||
{from} | {to} = source | destination station ID | {from} | {to} = source | destination station ID | ||
+ | |||
{date} format in Y-m-d such as 2018-03-29 | {date} format in Y-m-d such as 2018-03-29 | ||
- | **4. PUT_BOOKING** | + | |
+ | **4. PUT_BOOKING** | ||
when user completed a booking data this method will be use to put a booking data back to datacenter | when user completed a booking data this method will be use to put a booking data back to datacenter | ||
+ | |||
parameter: {key}&{method}&{serviceID}&{passengerName}&{telNo}& | parameter: {key}&{method}&{serviceID}&{passengerName}&{telNo}& | ||
- | {passportNo}&{amoutOfSeat} | + | {passportNo}&{email}&{amoutOfSeat}&{serviceCode} |
- | {serviceID} = user selected, {passportNo} is optional | + | --------------------------------------------------------- |
- | {amoutOfSeat} = total number of seat that booking | + | |
- | *** this method will output a booking number to use for reference** | + | |
- | **5. GET_BOOKING** | + | {serviceID} = user selected trip |
+ | |||
+ | {passengerName} and {telNo} are mandatory | ||
+ | |||
+ | {passportNo} and {email} are optional | ||
+ | |||
+ | {amoutOfSeat} = total number of booking seats | ||
+ | |||
+ | {serviceCode} = payment method (optional) | ||
+ | |||
+ | default - 00: Credit/Debit Card | PayPal , 02: Counter service | ||
+ | |||
+ | * this method will output a booking number to use for reference | ||
+ | |||
+ | |||
+ | **5. CONFIRM_PAYMENT** | ||
+ | |||
+ | after put a booking data, payment via credit/debit card or PayPal must process in 10 minutes, payment via other method must process before midnight or 4 hours before departure time, otherwise a booking will be cancelled | ||
+ | |||
+ | parameter: {key}&{method}&{bookingNo}&{process_by} | ||
+ | |||
+ | --------------------------------------------------------- | ||
+ | |||
+ | {process_by} = payment vendor name (7-Eleven, PayPal, …) | ||
+ | |||
+ | * this method will output a record field “success” or “failure” | ||
+ | |||
+ | |||
+ | **6. GET_BOOKING** | ||
you can get a booking data via use of booking number to produce a ticket or QR code or send to an user email | you can get a booking data via use of booking number to produce a ticket or QR code or send to an user email | ||
+ | |||
parameter: {key}&{method}&{bookingNo} | parameter: {key}&{method}&{bookingNo} | ||
+ | |||
+ | * use a ticket serial number to produce a QR code | ||
+ | |||