Skip to content

Instantly share code, notes, and snippets.

@daz4126
Created June 24, 2012 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daz4126/2983577 to your computer and use it in GitHub Desktop.
Save daz4126/2983577 to your computer and use it in GitHub Desktop.
post '/checkout' do
n = rand(3)
flash[:error] = "There was an error processing your payment" if n == 0
flash[:success] = "Your payment was successful" if n > 0
redirect to('/discount') if n == 2
redirect to('/finish')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment