If you arrive at a station and no ticket buying options are available to you, you'll be able to buy a ticket (including discounts) from the conductor on the train or at any point along your route.