Class Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::DirecPay::Notification

Constants

RESPONSE_PARAMS

Public Instance Methods

acknowledge() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 10
10:           def acknowledge
11:             true
12:           end
complete?() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 14
14:           def complete?
15:             status == 'Completed' || status == 'Pending'
16:           end
country() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 48
48:           def country
49:             params['Country']
50:           end
currency() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 44
44:           def currency
45:             params['Currency']
46:           end
gross() click to toggle source

the money amount we received in X.2 decimal

    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 40
40:           def gross
41:             params['Amount']
42:           end
item_id() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 31
31:           def item_id
32:             params['Merchant Order No']
33:           end
other_details() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 52
52:           def other_details
53:             params['Other Details']
54:           end
parse(post) click to toggle source

Take the posted data and move the relevant data into a hash

    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 61
61:           def parse(post)
62:             super
63:             
64:             values = params['responseparams'].to_s.split('|')
65:             response_params = values.size == 3 ? ['DirecPay Reference ID', 'Flag', 'Error message'] : RESPONSE_PARAMS
66:             response_params.each_with_index do |name, index|
67:               params[name] = values[index]
68:             end
69:             params
70:           end
status() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 18
18:           def status
19:             case params['Flag']
20:             when 'SUCCESS'
21:               'Completed'
22:             when 'PENDING'
23:               'Pending'
24:             when 'FAIL'
25:               'Failed'
26:             else
27:               'Error'
28:             end
29:           end
test?() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 56
56:           def test?
57:             false
58:           end
transaction_id() click to toggle source
    # File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 35
35:           def transaction_id
36:             params['DirecPay Reference ID']
37:           end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.