Class: ActiveMerchant::Billing::Integrations::Ipay88::Notification

Inherits:
Notification
  • Object
show all
Includes:
PostsData
Defined in:
lib/active_merchant/billing/integrations/ipay88/notification.rb

Instance Attribute Summary

Attributes inherited from Notification

#params, #raw

Instance Method Summary collapse

Methods inherited from Notification

#amount, #empty!, #gross_cents, #initialize, #test?, #valid_sender?

Constructor Details

This class inherits a constructor from ActiveMerchant::Billing::Integrations::Notification

Instance Method Details

#accountObject



28
29
30
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 28

def 
  params["MerchantCode"]
end

#acknowledgeObject



64
65
66
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 64

def acknowledge
  secure? && success? && requery == "00"
end

#auth_codeObject



44
45
46
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 44

def auth_code
  params["AuthCode"]
end

#complete?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 12

def complete?
  status == 'Completed'
end

#currencyObject



24
25
26
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 24

def currency
  params["Currency"]
end

#errorObject



48
49
50
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 48

def error
  params["ErrDesc"]
end

#grossObject



20
21
22
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 20

def gross
  params["Amount"]
end

#item_idObject



16
17
18
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 16

def item_id
  params["RefNo"]
end

#paymentObject



32
33
34
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 32

def payment
  params["PaymentId"].to_i
end

#remarkObject



36
37
38
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 36

def remark
  params["Remark"]
end

#secure?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 56

def secure?
  generated_signature == signature
end

#signatureObject



52
53
54
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 52

def signature
  params["Signature"]
end

#statusObject



8
9
10
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 8

def status
  params["Status"] == '1' ? 'Completed' : 'Failed'
end

#success?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 60

def success?
  status == 'Completed'
end

#transaction_idObject



40
41
42
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 40

def transaction_id
  params["TransId"]
end