gateway: add orders function