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 5 Next »

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

reservationIDVarchar(255)Reservation ID which returned from [ P_TKT_NewSales ] Add New Ticket SalesABC1234
cancellationReasonVarchar(255)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:'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

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

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


XML Node Explain

Node

Importance 

Explain

#PROPERTY_DISCOUNTLowThis node are use to provide system discount from EHORS, can be ignore

Sample package details in EHORS system

  • No labels