public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.