Class/Module 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
def acknowledge
  true
end
complete?() click to toggle source
# File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 14
def complete?
  status == 'Completed' || status == 'Pending'
end
country() click to toggle source
# File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 48
def country
  params['Country']
end
currency() click to toggle source
# File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 44
def currency
  params['Currency']
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
def gross
  params['Amount']
end
item_id() click to toggle source
# File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 31
def item_id
  params['Merchant Order No']
end
other_details() click to toggle source
# File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 52
def other_details
  params['Other Details']
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
def parse(post)
  super
  
  values = params['responseparams'].to_s.split('|')
  response_params = values.size == 3 ? ['DirecPay Reference ID', 'Flag', 'Error message'] : RESPONSE_PARAMS
  response_params.each_with_index do |name, index|
    params[name] = values[index]
  end
  params
end
status() click to toggle source
# File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 18
def status
  case params['Flag']
  when 'SUCCESS'
    'Completed'
  when 'PENDING'
    'Pending'
  when 'FAIL'
    'Failed'
  else
    'Error'
  end
end
test?() click to toggle source
# File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 56
def test?
  false
end
transaction_id() click to toggle source
# File lib/active_merchant/billing/integrations/direc_pay/notification.rb, line 35
def transaction_id
  params['DirecPay Reference ID']
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.