Class: ActiveMerchant::Billing::Integrations::Ipay88::Notification
- Inherits:
-
Notification
- Object
- Notification
- ActiveMerchant::Billing::Integrations::Ipay88::Notification
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
#amount, #empty!, #gross_cents, #initialize, #test?, #valid_sender?
Instance Method Details
#account ⇒ Object
28
29
30
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 28
def account
params["MerchantCode"]
end
|
#acknowledge ⇒ Object
64
65
66
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 64
def acknowledge
secure? && success? && requery == "00"
end
|
#auth_code ⇒ Object
44
45
46
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 44
def auth_code
params["AuthCode"]
end
|
#complete? ⇒ Boolean
12
13
14
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 12
def complete?
status == 'Completed'
end
|
#currency ⇒ Object
24
25
26
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 24
def currency
params["Currency"]
end
|
#error ⇒ Object
48
49
50
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 48
def error
params["ErrDesc"]
end
|
#gross ⇒ Object
20
21
22
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 20
def gross
params["Amount"]
end
|
#item_id ⇒ Object
16
17
18
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 16
def item_id
params["RefNo"]
end
|
#payment ⇒ Object
32
33
34
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 32
def payment
params["PaymentId"].to_i
end
|
36
37
38
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 36
def
params["Remark"]
end
|
#secure? ⇒ Boolean
56
57
58
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 56
def secure?
generated_signature == signature
end
|
#signature ⇒ Object
52
53
54
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 52
def signature
params["Signature"]
end
|
#status ⇒ Object
8
9
10
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 8
def status
params["Status"] == '1' ? 'Completed' : 'Failed'
end
|
#success? ⇒ Boolean
60
61
62
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 60
def success?
status == 'Completed'
end
|
#transaction_id ⇒ Object
40
41
42
|
# File 'lib/active_merchant/billing/integrations/ipay88/notification.rb', line 40
def transaction_id
params["TransId"]
end
|