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 3 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 confirm 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
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 paxes" with maximum characters of 255
bankTransactionNoYesVarchar(255)TUY72138211-Payment gateway replied reference number for this sales transaction
taxesCountYesNum(9)2-A number of selected attraction/BDI' tax for this sales, Example if guest selected attraction A (1 vat taxes) and attraction B (2 taxes), this variables is 3. Where the number of taxes can be obtains from XML node "#TAXES" from [ G_IND_Attractions ] Get Individual Attractions Price or [ G_PKG_Details ] Get Package Details
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"
taxBDIID_{x0}NoVarchar(255)ABC123

taxesCount
Max until (x0)


taxAccountID_{x0}NoVarchar(255)ABC123taxesCount
Max until (x0)

taxDescription_{x0}NoVarchar(255)VAT OUTPUTtaxesCount
Max until (x0)

taxServiceID_{x0}NoVarchar(255)ABC123taxesCount
Max until (x0)

taxServiceType_{x0}NoVarchar(255)vattaxesCount
Max until (x0)

taxPercentage_{x0}NoVarchar(255)12.00taxesCount
Max until (x0)

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

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

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

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

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

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

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

Sample Request with JS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

$(document).ready(function(){
    $.ajax({
        url:"https://api.ehors.com",
        method:'POST',
        dataType:'xml',
        data:{
            accessID:'ABC123',
            accessKey:'XYZ576abc',
            moduleCode:'P_TKT_CancelSales',
            command:'G_PKG_Details',
            reservationID:'ABC1234',
            cancellationReason:'Cancel from a payment gateway'
        },
        success:function(response){
            console.log(response);
        }
    })
});

Sample request with CURL

curl -d "accessID=ABC123&accessKey=XYZ576abc&moduleCode=TicketSales&command=P_TKT_CancelSales&reservationID=ABC1234&cancellationReason=Cancel from a payment gateway" -X POST https://api.ehors.com

Respond XML Sample


Success XML Sample

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