Class: OffsitePayments::Integrations::Newebpay::Notification
- Inherits:
-
Notification
- Object
- Notification
- OffsitePayments::Integrations::Newebpay::Notification
- Includes:
- HasTradeInfo
- Defined in:
- lib/offsite_payments/integrations/newebpay/notification.rb
Overview
The Notification object from NewebPay
Instance Method Summary collapse
-
#currency ⇒ String
The Newebpay use TWD as currency.
- #gross ⇒ Number
- #status ⇒ String
Methods included from HasTradeInfo
#checksum, #trade_info, #valid?
Instance Method Details
#currency ⇒ String
The Newebpay use TWD as currency
31 32 33 |
# File 'lib/offsite_payments/integrations/newebpay/notification.rb', line 31 def currency :TWD end |
#gross ⇒ Number
22 23 24 |
# File 'lib/offsite_payments/integrations/newebpay/notification.rb', line 22 def gross trade_info.dig('Result', 'Amt')&.to_i end |
#status ⇒ String
15 16 17 |
# File 'lib/offsite_payments/integrations/newebpay/notification.rb', line 15 def status trade_info['Status'] end |