Class ActiveMerchant::Billing::Integrations::HiTrust::Notification
In: lib/active_merchant/billing/integrations/hi_trust/notification.rb
Parent: ActiveMerchant::Billing::Integrations::Notification

Methods

Constants

SUCCESS = '00'

Public Instance methods

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 40
40:           def account
41:             params['storeid']
42:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 52
52:           def acknowledge      
53:             true
54:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 12
12:           def complete?
13:             status == 'Completed'
14:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 28
28:           def currency
29:             params['currency']
30:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 32
32:           def gross
33:             sprintf("%.2f", gross_cents.to_f / 100)
34:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 36
36:           def gross_cents
37:             params['approveamount'].to_i
38:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 20
20:           def item_id
21:             params['ordernumber']
22:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 24
24:           def received_at
25:             Time.parse(params['orderdate']) rescue nil
26:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 44
44:           def status
45:             params['retcode'] == SUCCESS ? 'Completed' : 'Failed'
46:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 48
48:           def test?
49:             ActiveMerchant::Billing::Base.integration_mode == :test
50:           end

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/notification.rb, line 16
16:           def transaction_id
17:             params['authRRN']
18:           end

[Validate]