- 20 Jun 2023
- 1 Minute to read
- DarkLight
Confirming an Uplift Booking
- Updated on 20 Jun 2023
- 1 Minute to read
- DarkLight
Confirming an Uplift Booking
Once a virtual payment card has been processed and the booking has been confirmed by you, a call containing a confirmation number for the booking must be sent to Uplift's API. This call informs Uplift that the booking was successfully completed and allows Uplift to provide a better customer service experience for all customers, as it will be used as a reference by Uplift's customer support representatives.
// Using a callback
orderManager.orderSuccess(with: "your_confirmation_id", completionBlock: { result in
switch result {
case .success(_):
// Success booking confirmation
case .failure(let error):
// An error has happened during confirmation request
}
})
// Using Async
try await orderManager.orderSuccessAsync(with: "your_confirmation_id")
Should an error occur in your system that prevents a traveler from successfully booking a trip and/or receiving a confirmation, a brief, human-friendly message describing the error that occurred must be passed to the Api. This will be used as a reference by Uplift's customer support representatives also.
let error = ULOrderError(errorType: .fatal, errorMessage: "A critical issue has happened")
// Using a callback
orderManager.orderFail(with: error, completionBlock: { result in
switch result {
case .success(_):
// Success failed booking confirmation
case .failure(let error):
// An error has happened during confirmation request
}
})
// Using Async
try await orderManager.orderFailAsync(with: error)
Deleting an Order
To delete an order once the booking is complete and confirmation has been sent to Uplift, call this method
orderManager.deleteOrder()