added loading and error page for receipt generation