Skip to content

Instantly share code, notes, and snippets.

@lessless
Created April 12, 2013 13:33
Show Gist options
  • Save lessless/5372027 to your computer and use it in GitHub Desktop.
Save lessless/5372027 to your computer and use it in GitHub Desktop.
require 'sinatra'
require 'rest-client'
require 'digest/sha1'
set :bind, '0.0.0.0'
set :port, 59898
get '/' do
content_type 'text/xml'
response = RestClient.post(
"https://eapi.privatbank.ua/settlement/xml",
{
merchid: params[:merchid],
date: params[:date],
signature: Digest::SHA1.base64digest("#{params[:password]}#{params[:merchid]}#{params[:date]}")
}
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment