Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

General Purpose


Request Parameter

Variable Name

Mandatory

Variable Type

Example

Parent Variable

Explain
outletIDYesVarchar(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
reservationIDYesVarchar(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
totalConfirmationYesDouble(10.2)1234.56-The total amount of sales to be confirmed for this booking, inclusive of all taxes in gross
paymentAmountYesDouble(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 
bankApprovalCodeYesVarchar(255)0017821-Approval code replied from the payment gateway to confirm this sale, this is the main references use in bank end accounting
cardHolderNameYesVarchar(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
cardNumberYesNum(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
cardTypeYesVarchar(255)VISA/MasterCard-Credit/Debit card type, sample are "VISA", "MasterCard", "Amex"
cardCVCYesVarchar(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
ccExpMonthYesVarchar(2)09-2 digits months format for the credit/debit card expiry month
ccExpYearYesVarchar(4)2025-Full 4 digits of year format for the credit/debit card expiry year
bankReferenceYesVarchar(255)ABC000012387812-Payment gateway replied reference number, can be bank batch number or any additional reference of this sales transaction
paymentRemarksYesVarchar(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
bankTransactionNoYesVarchar(255)TUY72138211-Payment gateway replied reference number for this sales transaction
attractionCountYesNum(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
guestFolioCountYesNum(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}NoVarchar(255)ABC123attractionCount
Max until (x0)

Counting from 0 until the maximum of "attractionCount"minus 1 (one). Selected attraction/BDI if its belonging to a package with package ID needed to be defined here, thus these variables can be blank if all selected attraction/BDI are an individual attraction.

Example:
If guest selected 1 package (ABC123) with 2 attractions and 2 individual attractions, total attractionCount = 4
attractionCount = 3
packageID_0 = "ABC123", packageID_1 = "ABC123", packageID_2 = "", packageID_3 = ""

paxCount_{x0}NoVarchar(255)6attractionCount
Max until (x0)

Counting from 0 until the maximum of "attractionCount"minus 1 (one). A number of pax for selected attraction/BDI, it'll be always the same if belonging to the same guest folio ID.

Example:
If guest folio 1 have 1 individual attraction x2 pax and another guest folio have 1 package of 2 items with x3 pax
attractionCount = 3
paxCount_0 = "2", paxCount_1 = "3", paxCount_2 = "3"

attractionID_{x0}NoVarchar(255)ABC123attractionCount
Max until (x0)

Counting from 0 until the maximum of "attractionCount"minus 1 (one). This is the selected attraction/BDI ID, please noted this is NOT the session of the attraction where it is the attraction/BDI ID itself. So if the package has the same attraction/BDI ID you'll need to define 2x follow by the selected from package to individual

Example:
If guest folio 1 have 1 individual attraction "A" and 1 package with attraction "A" and "B", guest folio 2 have individual attraction "C"
attractionCount = 4
attractionID_0 = "ABC001", attractionID_1 = "ABC002", attraction_2 = "ABC001", attraction_3 = "ABC003"

guestFolioID_{x0}NoVarchar(255)ABC123attractionCount
Max until (x0)

Counting from 0 until the maximum of "attractionCount"minus 1 (one). 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:
If guest folio 1 have 1 individual attraction "A" and 1 package with attraction "A" and "B", guest folio 2 have individual attraction "C"
attractionCount = 4
guestFolioID_0 = "ABC001", guestFolioID_1 = "ABC001", guestFolioID_2 = "ABC001", guestFolioID_3 = "ABC002"

itemPrice_{x0}NoDouble(10.2)0.00attractionCount
Max until (x0)

Counting from 0 until the maximum of "attractionCount" minus 1 (one). The price per attraction / BDIID to compare what has been booked and to be confirmed. The price MUST be for each individual selected attraction/BDI either from individual or package. Number format MUST be defined with rounding 2 decimal and WITHOUT thousand separator. Item price of an individual is with XML node "#ATTRACTION_ITEMS@itemPrice" from command [ G_IND_Attractions ] Get Individual Attractions Price and for package' attraction price are with XML node "#ATTRACTION_ITEMS@itemPrice_1" from command [ G_PKG_Details ] Get Package Details

Example:
If guest folio 1 has 3 individual attraction, guest folio 2 have 1 package with 3 attraction and guest folio 3 have 1 individual attraction
attractionCount = 7
itemPrice_0 = "250.00", itemPrice_1 = "1250.00", itemPrice_2 = "500.00", itemPrice_3 = "50.00", itemPrice_4 = "20.00",itemPrice_5 = "250.00", itemPrice_6 = "50.00"

BDI_tempWbn_{x0}NoVarchar(255)76sa6d_243762attractionCount
Max until (x0)

Counting from 0 until the maximum of "attractionCount"minus 1 (one). The temporary wristband number/ticket ID is to map with the guest folio for the selected attraction / BDI. It an XML node "#ATTRACTION_ITEMS@tempWristbandNo" returned from command [ P_TKT_NewSales ] Add New Ticket Sales. Each call to add sales belong to the same reservation ID to confirm from payment gateway are generated a temporary wristband number/ticket ID alongside with a guest folio to "group" the selected individual and or package of attraction(s)

Example:
If guest folio 1 have 1 individual attraction "A" and 1 package with attraction "A" and "B", guest folio 2 have individual attraction "C"
attractionCount = 4
BDI_tempWbn_0 = "605434177_52425a43", BDI_tempWbn_1 = "605434177_52425a43", BDI_tempWbn_2 = "605434177_52425a43", BDI_tempWbn_3 = "85546224_66as37h2"

guestFolioID_{x0}NoVarchar(255)ABC123guestFolioCount
Max until (x0)

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:
If guest folio 1 have 1 individual attraction "A" and 1 package with attraction "A" and "B", guest folio 2 have individual attraction "C"
guestFolioCount = 2
guestFolioID_0 = "ABC123", guestFolioID_1 = "ABC124"

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', 
			
			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',
			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&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 XML Sample

Success Message
<?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>

<?xml version="1.0" encoding="utf-8"?>
<SCRIPT_RESULT>
    <RESULT/>
    <SCRIPT_STATUS>SUCCESS</SCRIPT_STATUS>
</SCRIPT_RESULT>

XML Node Explain

No XML will return, only "Success" or failed if any system error, like database connection. May refer to NON-SUCCESS Messages

  • No labels