Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

General Purpose

The command will cancel the sales made from [ P_TKT_NewSales ] Add New Ticket Sales command and needed to execute when guest decide to cancel the booking or failed from the payment gateway or failed from payment gateway.

Request Parameter

Variable Name

Variable Type

Explain

Example

dateOfSalespackageID
reservationID
Date(YYYY-mm-dd)Date of sales, by given which date of sales to combine with packageID to fetch available attractions and session bundled in the package2017-11-03ABCD1234
Varchar(255)Reservation ID which returned from [ P_TKT_NewSales ] Add New Ticket SalesABC1234
cancellationReasonVarchar(255)
Package ID retrieve from [ G_ATT_Package ] Get Available Attraction Package, with combinations of above variable dateOfSales, if package are within validations dates, bundled attractions along with its session will be return
Description of why this cancellation is being performed, it may cause by user action or time out or payment gateway reject or cancel from the payment gatewayCancel from a payment gateway/ insufficient funds

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:'TicketSales',
            command:'

G

P_

PKG

TKT_

Details

CancelSales',
            

dateOfSales

reservationID:'

2017-11-03

ABC1234',

            packageID

            cancellationReason:'

ABCD1234

Cancel from a payment gateway'
        },
        success:function(response){
            console.log(response);
        }
    })
});

Sample request with CURL

curl -d "accessID=ABC123&accessKey=XYZ576abc&moduleCode=TicketSales&command=

G

P_

PKG

TKT_

Details

CancelSales&

dateOfSales=2017-11-03&packageID=ABCD1234

reservationID=ABC1234&cancellationReason=Cancel from a payment gateway" -X POST https://api.ehors.com

Respond XML Sample


Success XML Sample

...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36


Code Block
<?xml

...

 version="1.0"

...

 encoding="utf-8"?>

...

1
2
3
4
5
6
7
8
9

...

<?xml version="1.0" encoding="utf-8"?>
<SCRIPT_RESULT>
  <RESULT>
    <PROPERTY_DISCOUNTS senDiscPerc="20.00" senDiscVatExem="y" pwdDiscPerc="20.00" pwdDiscVatExem="y"/>
    <SPECIAL_VARIABLES totalBDICount="0"/>
    <CONSTANTS mode="scheduled" countryID="52" outletID="BB37"/>
  </RESULT>
  <SCRIPT_STATUS>SUCCESS</SCRIPT_STATUS>
</SCRIPT_RESULT>

XML Node Explain

...

Node

...

Importance 

...

Explain

...

Sample package details in EHORS system

...


<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