module WebpayMethods
Private Instance Methods
query_interswitch()
click to toggle source
# File lib/webpay_methods.rb, line 4 def query_interswitch headers = {:headers => { "Hash" => transaction_hash} } begin HTTParty.get("#{GT_DATA[:query_url]}#{transaction_params}", headers).parsed_response rescue {} end end
transaction_hash()
click to toggle source
# File lib/webpay_methods.rb, line 17 def transaction_hash Digest::SHA512.hexdigest(GT_DATA[:product_id] + gtpay_tranx_id + GT_DATA[:mac_id]) end
transaction_params()
click to toggle source
# File lib/webpay_methods.rb, line 13 def transaction_params "?productid=#{GT_DATA[:product_id]}&transactionreference=#{gtpay_tranx_id}&amount=#{amount_in_cents}" end