General Purpose
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) | ABC123 | - | Reservation ID from [ P_TKT_NewSales ] Add New Ticket Sales, from XML node of "#ATTRACTION_ITEMS@reservationID" this is the main reference to confirm a sales |
totalConfirmation | Yes | Double(10.2) | 1234.56 | - | 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) | 0017821 | - | Approval code replied from the payment gateway to confirm this sale, this is the main references use in bank end accounting |
cardHolderName | 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_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) | ABC123 | attractionCount | Counting from 0 until the maximum of " Example: |
paxCount_{x0} | No | Varchar(255) | 6 | attractionCount | Counting from 0 until the maximum of " Example: |
attractionID_{x0} | No | Varchar(255) | ABC123 | attractionCount | Counting from 0 until the maximum of " Example: |
guestFolioID_{x0} | No | Varchar(255) | ABC123 | attractionCount | Counting from 0 until the maximum of " Example: |
itemPrice_{x0} | No | Double(10.2) | 0.00 | attractionCount | Counting from 0 until the maximum of " Example: |
BDI_tempWbn_{x0} | No | Varchar(255) | 76sa6d_243762 | attractionCount | Counting from 0 until the maximum of " Example: |
guestFolioID_{x0} | No | Varchar(255) | ABC123 | guestFolioCount | Counting from 0 until the maximum of "guestFolioCount" minus 1 (one). Guest folio separates the group of selected attraction / BDI ID. Take for example if the guest have 2 different groups of selection, first folio is package with 2 attractions for 1 pax and another group is individual attractions for 4 pax. Example: |
Sample Request with JS
$(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', 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', 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); } }) });
|
Respond XML Sample
Success XML Sample
|
XML Node Explain
No XML will return, only "Success" or failed if any system error, like database connection. May refer to NON-SUCCESS Messages