General Purpose
Request Parameter
...
Variable Name
...
Variable Type
...
Example
...
Parent Variable
...
Given this command with requested parameters are to confirm the ticket sales in EHORS. Require parameters are inclusive of the server checkpoint to ensure the amounts, folio and selected attractions/BDI are correct to be confirmed. Therefore if the total amount and or given selected attraction / BDI are not matched with a given reservation, it'll return a general error and the sales will consider voided.
Info |
---|
Please do notice this command can only be executed once after the bank has confirmed the sales with payment and returns the information from payment gateway like approval code, bank transaction number, etc. If bank/payment gateway returned error link in-sufficient funds or invalid card, you shall call the cancel sales command [ P_TKT_CancelSales ] Cancel Ticket Sales. |
Request Parameter
Variable Name | Mandatory | Variable Type | Example | Parent Variable | Explain | |||||
---|---|---|---|---|---|---|---|---|---|---|
outletID | Yes | Varchar(255) | ABC123 | - | Outlet ID to use for the ticket sales, this ID can be obtained from XML node of "#CONSTANTS@outletID" under [ G_ATT_Planboard ] Get Plan Board Availability or [ G_IND_Attractions ] Get Individual Attractions Price or [ G_PKG_Details ] Get Package Details. | |||||
reservationID | Yes | Varchar(255) | JOHN SMITH | - | Credit/Debit cardholder name to confirm the sales, if payment gateway doesn't provide, can send the "#guestName" from [ P_TKTABC123 | - | Reservation ID from [ P_TKT_NewSales ] Add New Ticket SalescardNumber , from XML node of "#ATTRACTION_ITEMS@reservationID" this is the main reference to confirm a sales | |||
totalConfirmation | Yes | NumDouble(1710.2) | 41111111111111111234.56 | - | Credit/Debit card number, if the payment gateway doesn't provide, or you don't have a first layer to store, you may send in a dummy card number based on card type as the following a sample https://www.paypalobjects.com/en_GB/vhelp/paypalmanager_help/credit_card_numbers.htm | cardType The total amount of sales to be confirmed for this booking, inclusive of all taxes in gross | ||||
paymentAmount | Yes | Double(10.2) | 1234.56 | - | The total amount of payment where guest pays for this sales through payment gateway or the total amount bank confirmed. This amount should be the same as total confirmation | |||||
bankApprovalCode | Yes | Varchar(255) | VISA/MasterCard0017821 | - | Credit/Debit card type, sample are "VISA", "MasterCard", "Amex" | cardCVC Approval code replied from the payment gateway to confirm this sale, this is the main references use in bank end accounting | ||||
cardHolderName | Yes | Varchar(4255) | 1234JOHN SMITH | - | Credit/Debit card CVC/CCV2 number and if the cardholder name to confirm the sales, if payment gateway doesn't provide or you don't have a layer before sending to the payment gateway, you can provide a dummy 3 to 4 digits codes like 000 or 0000 | |||||
ccExpMonth | Yes | Varchar(2) | 09 | - | 2 digits months format for the credit/debit card expiry month | |||||
ccExpYear | Yes | Varchar(4) | 2025 | - | Full 4 digits of year format for the credit/debit card expiry year | |||||
bankReference | Yes | Varchar(255) | ABC000012387812 | - | Payment gateway replied reference number, can be bank batch number or any additional reference of this sales transaction | |||||
paymentRemarks | Yes | Varchar(255) | Online ticket sales ABC123 | - | Text description of this sales can be simple remarks like "Online sales payments for ticket sales ABC123". Or details like "Online payment for ABC123, 2x attraction A for 2 pax" with maximum characters of 255 | |||||
bankTransactionNo | Yes | Varchar(255) | TUY72138211 | - | Payment gateway replied reference number for this sales transaction | |||||
attractionCount | Yes | Num(9) | 1 | - | A number of attractions selected inclusive in the package selected and individual. Example if 1 guest folio selected 1 package with 3 attraction plus 2 individuals attractions is equal to 5 in this variable | |||||
guestFolioCount | Yes | Num(9) | 3 | - | Number of the guest folio which is after making [ P_TKT_NewSales ] Add New Ticket Sales under the XML node "#ATTRACTION_ITEMS" | |||||
packageID_{x0} | No | Varchar(255) | ABC123 | attractionCount | Counting from 0 until the maximum of " Example: | |||||
paxCount_{can send the "#guestName" from [ P_TKT_NewSales ] Add New Ticket Sales | ||||||||||
cardNumber | Yes | Num(17) | 4111111111111111 | - | Credit/Debit card number, if the payment gateway doesn't provide, or you don't have a first layer to store, you may send in a dummy card number based on card type as the following a sample https://www.paypalobjects.com/en_GB/vhelp/paypalmanager_help/credit_card_numbers.htm | |||||
cardType | Yes | Varchar(255) | VISA/MasterCard | - | Credit/Debit card type, sample are "VISA", "MasterCard", "Amex" | |||||
cardCVC | Yes | Varchar(4) | 1234 | - | Credit/Debit card CVC/CCV2 number and if the payment gateway doesn't provide or you don't have a layer before sending to the payment gateway, you can provide a dummy 3 to 4 digits codes like 000 or 0000 | |||||
ccExpMonth | Yes | Varchar(2) | 09 | - | 2 digits months format for the credit/debit card expiry month | |||||
ccExpYear | Yes | Varchar(4) | 2025 | - | Full 4 digits of year format for the credit/debit card expiry year | |||||
bankReference | Yes | Varchar(255) | ABC000012387812 | - | Payment gateway replied reference number, can be bank batch number or any additional reference of this sales transaction | |||||
paymentRemarks | Yes | Varchar(255) | Online ticket sales ABC123 | - | Text description of this sales can be simple remarks like "Online sales payments for ticket sales ABC123". Or details like "Online payment for ABC123, 2x attraction A for 2 pax" with maximum characters of 255 | |||||
bankTransactionNo | Yes | Varchar(255) | TUY72138211 | - | Payment gateway replied reference number for this sales transaction | |||||
attractionCount | Yes | Num(9) | 1 | - | A number of attractions selected inclusive in the package selected and individual. Example if 1 guest folio selected 1 package with 3 attraction plus 2 individuals attractions is equal to 5 in this variable | |||||
guestFolioCount | Yes | Num(9) | 3 | - | Number of the guest folio which is after making [ P_TKT_NewSales ] Add New Ticket Sales under the XML node "#ATTRACTION_ITEMS" | |||||
packageID_{x0} | No | Varchar(255) | 6ABC123 | attractionCount | Counting from 0 until the maximum of " Example: | |||||
attractionIDpaxCount_{x0} | No | Varchar(255) | ABC1236 | attractionCount | Counting from 0 until the maximum of " Example:
| |||||
attractionID_{x0} | No | Varchar(255) | ABC123 | attractionCount | Counting from 0 until the maximum of " Example: | |||||
itemPriceBDI_guestFolioID_{x0} | No | DoubleVarchar(10.2255) | 0.00ABC123 | attractionCount | Counting from 0 until the maximum of " Example: | BDI_tempWbn_{x0} | No | Varchar(255) | 76sa6d_243762 | This is the guest folio ID if the number of pax combination of attractions and or package is different, the guest folio ID are returned after the [ P_TKT_NewSales ] Add New Ticket Sales for given selected individual attraction and or package with a combination of pax Example: |
itemPrice_{x0} | No | Double(10.2) | 0.00 | attractionCount | Counting from 0 until the maximum of " Example:
| |||||
BDI_tempWbn_{x0} | No | Varchar(255) | ABC12376sa6d_243762 | guestFolioCountattractionCount | Counting from 0 until the maximum of "guestFolioCount Example: |
Sample Request with JS
...
language | js |
---|---|
linenumbers | true |
...
| |||||
guestFolioID_{x0} | No | Varchar(255) | ABC123 | guestFolioCount | Counting from 1 until the maximum of "guestFolioCount". Guest folio separates the group of selected attraction / BDI ID. Take for example if the guest has 2 different groups of selection, the first folio is package with 2 attractions for 1 pax and another group is individual attractions for 4 pax. Example: |
Sample Request with JS
Code Block | ||||
---|---|---|---|---|
| ||||
$(document).ready(function(){ $.ajax({ url:"https://api.ehors.com", method:'POST', dataType:'xml', data:{ accessID:'ABC123', accessKey:'XYZ576abc', moduleCode:'TicketSales', command:'P_TKT_ConfirmSales', outletID:'LCA7', reservationID:'LCX76', totalConfirmation:'800', paymentAmount:'800', cardHolderName:'John Smith', cardNumber:'4111111111111111', cardType:'VISA', cardCVC:'411', ccExpMonth:'09', ccExpYear:'2029', bankApprovalCode:'41178', bankReference:'00ASTT8182321', bankTransactionNo:'411560002245', paymentRemarks:'Online Payment', attractionCount:'5', attractionCountpaxCount_0:'1', attractionCountpaxCount_1:'1', attractionCountpaxCount_2:'1', attractionCountpaxCount_3:'1', attractionCountpaxCount_4:'1', attractionID_0:'LCB1', attractionID_1:'LCA4', attractionID_2:'LCB4', attractionID_3:'LCA5', attractionID_4:'LCA6', itemPrice_0:'220.00', itemPrice_1:'250.00', itemPrice_2:'65.00', itemPrice_3:'250.00', itemPrice_4:'15.00', packageID_0:'LCA1', packageID_1:'LCA1', packageID_2:'LCA1', packageID_3:'LCA1', packageID_4:'LCA1', BDI_guestFolioID_0:'LCX94', BDI_guestFolioID_1:'LCX94', BDI_guestFolioID_2:'LCX94', BDI_guestFolioID_3:'LCX94', BDI_guestFolioID_4:'LCX94', BDI_tempWbn_0:'605434177_3836700b', BDI_tempWbn_1:'605434177_3836700b', BDI_tempWbn_2:'605434177_3836700b', BDI_tempWbn_3:'605434177_3836700b', BDI_tempWbn_4:'605434177_3836700b', guestFolioCount:'1', guestFolioID_1:'LCX94' }, success:function(response){ console.log(response); } }) }); |
Sample request with CURL
...
curl -v -d "accessID=ABC123&accessKey=EFG56788&moduleCode=TicketSales&command=P_TKT_ConfirmSales&BDI_guestFolioID_0=LCX94&BDI_guestFolioID_1=LCX94&BDI_guestFolioID_2=LCX94&BDI_guestFolioID_3=LCX94&BDI_guestFolioID_4=LCX94&BDI_tempWbn_0=605434177_3836700b&BDI_tempWbn_1=605434177_3836700b&BDI_tempWbn_2=605434177_3836700b&BDI_tempWbn_3=605434177_3836700b&BDI_tempWbn_4=605434177_3836700b&attractionCount=5&guestFolioCount=1&paymentAmount=800&bankApprovalCode=41178&attractionCount_0=1&attractionCount_1=1&attractionCount_2=1&attractionCount_3=1&attractionCount_4=1&attractionID_0=LCB1&attractionID_1=LCA4&attractionID_2=LCB4&attractionID_3=LCA5&attractionID_4=LCA6&cardHolderName=John Smith&cardNumber=4111111111111111&cardType=VISA&cardCVC=411&totalConfirmation=800&guestFolioID_1=LCX94&itemPrice_0=220.00&itemPrice_1=250.00&itemPrice_2=65.00&itemPrice_3=250.00&itemPrice_4=15.00&ccExpMonth=09&outletID=LCA7&packageID_0=LCA1&packageID_1=LCA1&packageID_2=LCA1&packageID_3=LCA1&packageID_4=LCA1&bankReference=00ASTT8182321&paymentRemarks=Online Payment&reservationID=LCX76&bankTransactionNo=411560002245&ccExpYear=2029" -X POST https://api.ehors.com
Respond XML Sample
...
|
XML Node Explain
...
Sample request with CURL
Code Block |
---|
curl -v -d "accessID=ABC123&accessKey=EFG56788&moduleCode=TicketSales&command=P_TKT_ConfirmSales&BDI_guestFolioID_0=LCX94&BDI_guestFolioID_1=LCX94&BDI_guestFolioID_2=LCX94&BDI_guestFolioID_3=LCX94&BDI_guestFolioID_4=LCX94&BDI_tempWbn_0=605434177_3836700b&BDI_tempWbn_1=605434177_3836700b&BDI_tempWbn_2=605434177_3836700b&BDI_tempWbn_3=605434177_3836700b&BDI_tempWbn_4=605434177_3836700b&attractionCount=5&guestFolioCount=1&paymentAmount=800&bankApprovalCode=41178&paxCount_0=1&paxCount_1=1&paxCount_2=1&paxCount_3=1&paxCount_4=1&attractionID_0=LCB1&attractionID_1=LCA4&attractionID_2=LCB4&attractionID_3=LCA5&attractionID_4=LCA6&cardHolderName=John Smith&cardNumber=4111111111111111&cardType=VISA&cardCVC=411&totalConfirmation=800&guestFolioID_1=LCX94&itemPrice_0=220.00&itemPrice_1=250.00&itemPrice_2=65.00&itemPrice_3=250.00&itemPrice_4=15.00&ccExpMonth=09&outletID=LCA7&packageID_0=LCA1&packageID_1=LCA1&packageID_2=LCA1&packageID_3=LCA1&packageID_4=LCA1&bankReference=00ASTT8182321&paymentRemarks=Online Payment&reservationID=LCX76&bankTransactionNo=411560002245&ccExpYear=2029" -X POST https://api.ehors.comRespond XML Sample |
Respond Success XML Sample - Single package booking for 1 pax = 1 ticket number
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="utf-8"?>
<SCRIPT_RESULT>
<RESULT>
<ATTRACTION_ITEMS foInvoiceID="LCZ56" foInvoicePaymentID="LCZ21" revenuePropertyID="2" posGuestDummyID="LCZ29" outletID="LCA7" reservationID="LCZ38"/>
<TICKET_NODE guestFolioID="LCZ57" mainTicketNo="PBE00014XXXXX" totalNoPax="1">
<TICKET_INFO_NODE ticketQRNumber="PBE0001400001" generatedDate="2019-09-12">
<TICKET_DETAIL_NODE detailMode="PACKAGE:INBOUND">
<BDI_SESSION_NODE sessionFrom="01:00 AM" sessionUntil="11:59 PM" attractionName="SERVICE CHARGE"/>
<BDI_SESSION_NODE sessionFrom="01:00 AM" sessionUntil="11:59 PM" attractionName="PHOTOGRAPHY"/>
<BDI_SESSION_NODE sessionFrom="01:00 AM" sessionUntil="11:59 PM" attractionName="MARINE CONSERVATION"/>
<BDI_SESSION_NODE sessionFrom="01:00 AM" sessionUntil="11:59 PM" attractionName="E-LEARNING RESOURCES"/>
<BDI_SESSION_NODE sessionFrom="01:00 AM" sessionUntil="11:59 PM" attractionName="ADMISSION"/>
</TICKET_DETAIL_NODE>
</TICKET_INFO_NODE>
</TICKET_NODE>
</RESULT>
<SCRIPT_STATUS>SUCCESS</SCRIPT_STATUS>
</SCRIPT_RESULT> |
Respond Success XML Sample - Individual attraction tickets for 5 pax = 5 ticket number
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="utf-8"?>
<SCRIPT_RESULT>
<RESULT>
<ATTRACTION_ITEMS foInvoiceID="LCZ61" foInvoicePaymentID="LCZ25" revenuePropertyID="2" posGuestDummyID="LCZ34" outletID="LCA7" reservationID="LCZ44"/>
<TICKET_NODE guestFolioID="LCZ63" mainTicketNo="PBE00018XXXXX" totalNoPax="5">
<TICKET_INFO_NODE ticketQRNumber="PBE0001800001" generatedDate="2019-09-12">
<TICKET_DETAIL_NODE detailMode="EXTRA">
<BDI_SESSION_NODE sessionFrom="11:00 AM" sessionUntil="11:45 AM" attractionName="SEATREK"/>
</TICKET_DETAIL_NODE>
</TICKET_INFO_NODE>
<TICKET_INFO_NODE ticketQRNumber="PBE0001800002" generatedDate="2019-09-12">
<TICKET_DETAIL_NODE detailMode="EXTRA">
<BDI_SESSION_NODE sessionFrom="11:00 AM" sessionUntil="11:45 AM" attractionName="SEATREK"/>
</TICKET_DETAIL_NODE>
</TICKET_INFO_NODE>
<TICKET_INFO_NODE ticketQRNumber="PBE0001800003" generatedDate="2019-09-12">
<TICKET_DETAIL_NODE detailMode="EXTRA">
<BDI_SESSION_NODE sessionFrom="11:00 AM" sessionUntil="11:45 AM" attractionName="SEATREK"/>
</TICKET_DETAIL_NODE>
</TICKET_INFO_NODE>
<TICKET_INFO_NODE ticketQRNumber="PBE0001800004" generatedDate="2019-09-12">
<TICKET_DETAIL_NODE detailMode="EXTRA">
<BDI_SESSION_NODE sessionFrom="11:00 AM" sessionUntil="11:45 AM" attractionName="SEATREK"/>
</TICKET_DETAIL_NODE>
</TICKET_INFO_NODE>
<TICKET_INFO_NODE ticketQRNumber="PBE0001800005" generatedDate="2019-09-12">
<TICKET_DETAIL_NODE detailMode="EXTRA">
<BDI_SESSION_NODE sessionFrom="11:00 AM" sessionUntil="11:45 AM" attractionName="SEATREK"/>
</TICKET_DETAIL_NODE>
</TICKET_INFO_NODE>
<TICKET_INFO_NODE ticketQRNumber="PBE0001800006" generatedDate="2019-09-12">
<TICKET_DETAIL_NODE detailMode="EXTRA">
<BDI_SESSION_NODE sessionFrom="11:00 AM" sessionUntil="11:45 AM" attractionName="SEATREK"/>
</TICKET_DETAIL_NODE>
</TICKET_INFO_NODE>
</TICKET_NODE>
</RESULT>
<SCRIPT_STATUS>SUCCESS</SCRIPT_STATUS>
</SCRIPT_RESULT> |
Respond Failed XML Sample - Duplicate transactions
Code Block |
---|
<?xmlversion="1.0"encoding="utf-8"?>
<SCRIPT_RESULT>
<RESULT/>
<SCRIPT_STATUS>SYSTEMLAGERROR</SCRIPT_STATUS>
<SCRIPT_MESSAGE>
System Lag Triggered double Posting of Revenue
Transaction Has been halted... Please Restart Transaction
2019-09-13 09:23:30 << SCRIPT SESSION CLOSE
=== END OF MESSAGE ===
</SCRIPT_MESSAGE>
</SCRIPT_RESULT> |
XML Node Explain
Node | Importance | Explain |
---|---|---|
#ATTRACTION_ITEMS | High | This will only be a single node with child attribute of the sales reservation details like invoice number, receipt number from Ehors to indicated this booking are confirmed and revenue booked correctly when you have this node. |
#ATTRACTION_ITEMS@foInvoiceID | High | The invoice number from Ehors which later for the guest as one of the reference number to check his/her sales booking from Ehors when he is physically check-in |
#ATTRACTION_ITEMS@foInvoicePaymentID | Low | Payments details ID from Ehors to check if the payment sub-ledger are in Ehors or not |
#ATTRACTION_ITEMS@revenuePropertyID | Low | EHORS is an ERP system whereas each and every module follows the same hierarchy and system flow, therefore certain fields do not require a further explanation and are just needed to support to flow of EHORS. Can be ignored. |
#ATTRACTION_ITEMS@posGuestDummyID | High | This serves as official receipt number from Ehors which guest can request a reprint of the official receipt number from Ehors |
#ATTRACTION_ITEMS@outletID | Low | EHORS is an ERP system whereas each and every module follows the same hierarchy and system flow, therefore certain fields do not require a further explanation and are just needed to support to flow of EHORS. Can be ignored. |
#ATTRACTION_ITEMS@reservationID | High | Unique ID from EHORS system when the booking is in system. This to confirm from your given parameter are matched |
#TICKET_NODE | High | Number of nodes indicated how many guest folio or combinations of sales, example if 1 folio is booked with package for 2 pax and another folio booked with an individual for 3 pax, this node will appear 2x with 2 different guest folio ID |
#TICKET_NODE @guestFolioID | Low | Unique ID generated from Ehors from previous command [ P_TKT_NewSales ] Add New Ticket Sales, if the guest folio are confirmed correctly in the system this should matched the parameters guestFolioID_{x0} send to API |
#TICKET_NODE @mainTicketNo | High | Main ticket number from Ehors, last 5 digits (xxxxx) from the number will be the total number of guest for this guest folio combination. First 8 characters are uniquely generated from Ehors for each guest folio |
#TICKET_NODE @totalNoPax | High | A number of pax for this folio is a multiplier for each combinations sales of package and or attraction on the following node. Example if 1 package with additional individual attraction for 2 pax. It'll have 2x following sub child node |
#TICKET_NODE#TICKET_INFO_NODE | High | Sub child node from #TICKET_NODE is for each single tickets of the sales. if 4 pax from the combination package and or attraction on the single guest folio this will be 4 tickets generated |
#TICKET_NODE#TICKET_INFO_NODE @ticketQRNumber | High | Unique ticket number for guest to be used in physical property check-in and utilize the attraction and or package. This should be generated in standard QR format with the given serial for each ticket so your guest can use in the property. |
#TICKET_NODE#TICKET_INFO_NODE @generatedDate | Low | Date of the QR ticket number generated |
#TICKET_NODE#TICKET_INFO_NODE#TICKET_DETAIL_NODE | High | This node details for the ticket, so it'll indicate the breakdown and what are inclusive in this ticket, can have 1 or 2 only for this child node. Either a single package or "extra" or package + extra, a total maximum of this child node is only 2 and minimum 1 |
#TICKET_NODE#TICKET_INFO_NODE#TICKET_DETAIL_NODE @detailMode | High | Type of the breakdown details, ether a "PACKAGE:(PACKAGE_NAME)" = package in combinations of attractions / BDI or "EXTRA" = Individual attraction |
#TICKET_NODE#TICKET_INFO_NODE#TICKET_DETAIL_NODE#BDI_SESSION_NODE | High | Sessions node are the actual attraction, either in a combination of packages and or selected individual attraction, minimum one node from parent node #TICKET_DETAIL_NODE. Attributes of this node are the details for the attraction' session. |
#TICKET_NODE#TICKET_INFO_NODE#TICKET_DETAIL_NODE#BDI_SESSION_NODE @sessionFrom | High | The session's valid from time. Refer to node #PLANBOARD_ITEMS@startTime from [ G_ATT_Planboard ] Get Plan Board Availability |
#TICKET_NODE#TICKET_INFO_NODE#TICKET_DETAIL_NODE#BDI_SESSION_NODE @sessionUntil | High | The session's valid until time. Refer to node #PLANBOARD_ITEMS@endTime from [ G_ATT_Planboard ] Get Plan Board Availability |
#TICKET_NODE#TICKET_INFO_NODE#TICKET_DETAIL_NODE#BDI_SESSION_NODE @attractionName | High | Session name created from Ehors for the attraction |