Sha256: 5df79793874af6df19bac0e867d80562cd41639774332f1e997d13ea5fccf093
Contents?: true
Size: 1.27 KB
Versions: 173
Compression:
Stored size: 1.27 KB
Contents
require 'net/http' module ActiveMerchant #:nodoc: module Billing #:nodoc: module Integrations #:nodoc: module HiTrust class Notification < ActiveMerchant::Billing::Integrations::Notification SUCCESS = '00' self.production_ips = [ '203.75.242.8' ] def complete? status == 'Completed' end def transaction_id params['authRRN'] end def item_id params['ordernumber'] end def received_at Time.parse(params['orderdate']) rescue nil end def currency params['currency'] end def gross sprintf("%.2f", gross_cents.to_f / 100) end def gross_cents params['approveamount'].to_i end def account params['storeid'] end def status params['retcode'] == SUCCESS ? 'Completed' : 'Failed' end def test? ActiveMerchant::Billing::Base.integration_mode == :test end def acknowledge true end end end end end end
Version data entries
173 entries across 173 versions & 34 rubygems