module EpayClient

Public Instance Methods

calc_v2_hash(account,key) click to toggle source
# File lib/epay/client.rb, line 16
def calc_v2_hash(account,key)
  @v2_hash=Digest::MD5.hexdigest("#{account}:#{key}")
end
get_transactions(v2_hash,account) click to toggle source
# File lib/epay/client.rb, line 6
def get_transactions(v2_hash,account)
  uri="https://api.epay.com/paymentApi/getTransactionRecords?PAYER_ACCOUNT=#{account}&V2_HASH=#{v2_hash}"
  request(uri)
end
request(uri) click to toggle source
# File lib/epay/client.rb, line 11
def request(uri)
  response = Unirest.get "#{uri}",
                         headers:{ "Accept" => "application/json" } ,parameters: nil
  response
end