Class: ActiveMerchant::Billing::Integrations::Ccavenue::Notification
- Inherits:
-
Notification
- Object
- Notification
- ActiveMerchant::Billing::Integrations::Ccavenue::Notification
- Defined in:
- lib/active_merchant_ccavenue/notification.rb
Instance Method Summary collapse
- #complete? ⇒ Boolean
-
#gross ⇒ Object
the money amount we received in X.2 decimal.
- #payment_id ⇒ Object
- #security_key ⇒ Object
- #status ⇒ Object
- #transaction_id ⇒ Object
- #valid? ⇒ Boolean
Instance Method Details
#complete? ⇒ Boolean
17 18 19 |
# File 'lib/active_merchant_ccavenue/notification.rb', line 17 def complete? 'Y' == self.status end |
#gross ⇒ Object
the money amount we received in X.2 decimal.
34 35 36 |
# File 'lib/active_merchant_ccavenue/notification.rb', line 34 def gross params['Amount'] end |
#payment_id ⇒ Object
21 22 23 |
# File 'lib/active_merchant_ccavenue/notification.rb', line 21 def payment_id params['Order_Id'] end |
#security_key ⇒ Object
29 30 31 |
# File 'lib/active_merchant_ccavenue/notification.rb', line 29 def security_key params['Checksum'] end |
#status ⇒ Object
38 39 40 |
# File 'lib/active_merchant_ccavenue/notification.rb', line 38 def status params['AuthDesc'] end |
#transaction_id ⇒ Object
25 26 27 |
# File 'lib/active_merchant_ccavenue/notification.rb', line 25 def transaction_id params['nb_order_no'] end |
#valid? ⇒ Boolean
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/active_merchant_ccavenue/notification.rb', line 6 def valid? verify_checksum( self.security_key, ActiveMerchant::Billing::Integrations::Ccavenue.merchant_id, self.payment_id, self.gross, self.status, ActiveMerchant::Billing::Integrations::Ccavenue.work_key ) end |