Sha256: 0d26d77cf4ba1bd4d5e3965b0f692b7a1793b5577b9f88ad24fed4eb35c4bdb6
Contents?: true
Size: 509 Bytes
Versions: 3
Compression:
Stored size: 509 Bytes
Contents
module WebpayMethods private def query_interswitch headers = {:headers => { "Hash" => transaction_hash} } begin HTTParty.get("#{GT_DATA[:query_url]}#{transaction_params}", headers).parsed_response rescue {} end end def transaction_params "?productid=#{GT_DATA[:product_id]}&transactionreference=#{gtpay_tranx_id}&amount=#{amount_in_cents}" end def transaction_hash Digest::SHA512.hexdigest(GT_DATA[:product_id] + gtpay_tranx_id + GT_DATA[:mac_id]) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
spree_gtpay-1.0.2 | lib/webpay_methods.rb |
spree_gtpay-1.0.1 | lib/webpay_methods.rb |
spree_gtpay-1.0.0 | lib/webpay_methods.rb |