Class: ActiveMerchant::Billing::Integrations::Gestpay::Notification
- Inherits:
-
Notification
- Object
- Notification
- ActiveMerchant::Billing::Integrations::Gestpay::Notification
show all
- Includes:
- Common
- Defined in:
- lib/active_merchant/billing/integrations/gestpay/notification.rb
Constant Summary
Constants included
from Common
Common::CURRENCY_MAPPING, Common::DECRYPTION_PATH, Common::DELIMITER, Common::ENCRYPTION_PATH, Common::VERSION
Instance Attribute Summary
Attributes inherited from Notification
#params, #raw
Instance Method Summary
collapse
Methods included from Common
#parse_response, #ssl_get
#amount, #empty!, #gross_cents, #initialize, #valid_sender?
Instance Method Details
#acknowledge ⇒ Object
45
46
47
|
# File 'lib/active_merchant/billing/integrations/gestpay/notification.rb', line 45
def acknowledge
true
end
|
#complete? ⇒ Boolean
10
11
12
|
# File 'lib/active_merchant/billing/integrations/gestpay/notification.rb', line 10
def complete?
status == 'Completed'
end
|
#currency ⇒ Object
28
29
30
|
# File 'lib/active_merchant/billing/integrations/gestpay/notification.rb', line 28
def currency
CURRENCY_MAPPING.index(params['PAY1_UICCODE'])
end
|
#gross ⇒ Object
the money amount we received in X.2 decimal.
24
25
26
|
# File 'lib/active_merchant/billing/integrations/gestpay/notification.rb', line 24
def gross
params['PAY1_AMOUNT']
end
|
#item_id ⇒ Object
15
16
17
|
# File 'lib/active_merchant/billing/integrations/gestpay/notification.rb', line 15
def item_id
params['PAY1_SHOPTRANSACTIONID']
end
|
#status ⇒ Object
36
37
38
39
40
41
42
43
|
# File 'lib/active_merchant/billing/integrations/gestpay/notification.rb', line 36
def status
case params['PAY1_TRANSACTIONRESULT']
when 'OK'
'Completed'
else
'Failed'
end
end
|
#test? ⇒ Boolean
32
33
34
|
# File 'lib/active_merchant/billing/integrations/gestpay/notification.rb', line 32
def test?
false
end
|
#transaction_id ⇒ Object
19
20
21
|
# File 'lib/active_merchant/billing/integrations/gestpay/notification.rb', line 19
def transaction_id
params['PAY1_BANKTRANSACTIONID']
end
|