Top Level Namespace
Defined Under Namespace
Classes: Kkiapay
Constant Summary collapse
- BASE_URL =
"https://api.kkiapay.me"- SANDBOX_URL =
"https://api-sandbox.kkiapay.me"
Instance Method Summary collapse
Instance Method Details
#make_request(uri, transaction_id, headers) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/kkiapay.rb', line 9 def make_request(uri, transaction_id, headers) begin https = Net::HTTP.new(uri.host,uri.port) https.use_ssl = true req = Net::HTTP::Post.new(uri.path, initheader=headers) req.body = { "transactionId" => transaction_id }.to_json res = https.request(req) res.body rescue e e end end |