Now that the user has completed the BookingForm, it is time to create the Order. The following method will create the Order which you can then present to the user for review.
BookingForm
Order
Traveler.createOrder(bookingForm: bookingForm) { (order, error) in }
Alternatively you can use the delegate pattern
Traveler.createOrder(bookingForm: bookingForm, delegate: self)
extension MyViewController: OrderCreateDelegate { func orderCreationDidSucceed(_ order: Order) { } func orderCreationDidFail(_ error: Error) { } }
Traveler.createOrder(bookingForm, new OrderCreateCallback() { @Override void onOrderCreateSuccess(Order order) { } @Override void onOrderCreateFailure(Error error) { } });
Last updated 5 years ago