Skip to content

Instantly share code, notes, and snippets.

@ianjuma
Last active August 10, 2016 11:41
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 ianjuma/80e1163d871bd1c0565b9c61a2907759 to your computer and use it in GitHub Desktop.
Save ianjuma/80e1163d871bd1c0565b9c61a2907759 to your computer and use it in GitHub Desktop.
require 'sinatra'
require 'AfricasTalkingGateway'
# gateway = AfricasTalkingGateway.new("username", "apikey");
post '/ussd' do
@sessionId = params[:sessionId]
@serviceCode = params[:serviceCode]
@phoneNumber = params[:phoneNumber]
@text = params[:text]
puts "text - #{@text} on - #{@phoneNumber}"
response = "END I will call and tell you about the origins of ruby."
body response
status 200
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment