It is generally not recommended to wait until the last second to buy your ticket at the airport. Buying tickets online is a safer and more convenient option.