Class: ActiveMerchant::Billing::Integrations::Paysbuy::Notification
- Inherits:
-
Notification
- Object
- Notification
- ActiveMerchant::Billing::Integrations::Paysbuy::Notification
show all
- Defined in:
- lib/active_merchant/billing/integrations/paysbuy/notification.rb
Constant Summary
collapse
- SUCCESS =
'00'
- FAIL =
'99'
Instance Attribute Summary
Attributes inherited from Notification
#params, #raw
Instance Method Summary
collapse
#amount, #empty!, #gross, #gross_cents, #initialize, #test?, #valid_sender?
Instance Method Details
#acknowledge ⇒ Object
21
22
23
|
# File 'lib/active_merchant/billing/integrations/paysbuy/notification.rb', line 21
def acknowledge
true
end
|
#complete? ⇒ Boolean
9
10
11
|
# File 'lib/active_merchant/billing/integrations/paysbuy/notification.rb', line 9
def complete?
status == 'Completed'
end
|
#item_id ⇒ Object
13
14
15
|
# File 'lib/active_merchant/billing/integrations/paysbuy/notification.rb', line 13
def item_id
params['result'][2..-1]
end
|
#status ⇒ Object
17
18
19
|
# File 'lib/active_merchant/billing/integrations/paysbuy/notification.rb', line 17
def status
params['result'][0..1] == SUCCESS ? 'Completed' : 'Failed'
end
|