Class: OffsitePayments::Integrations::Newebpay::Return
- Inherits:
-
Return
- Object
- Return
- OffsitePayments::Integrations::Newebpay::Return
- Includes:
- HasTradeInfo
- Defined in:
- lib/offsite_payments/integrations/newebpay/return.rb
Overview
The Return object from NewebPay
Instance Method Summary collapse
-
#cancelled? ⇒ TrueClass|FalseClass
Does payment cancelled.
-
#message ⇒ String
The Message from Newebpay.
-
#success? ⇒ TrueClass|FalseClass
Does payment success.
Methods included from HasTradeInfo
#checksum, #trade_info, #valid?
Instance Method Details
#cancelled? ⇒ TrueClass|FalseClass
Does payment cancelled
26 27 28 |
# File 'lib/offsite_payments/integrations/newebpay/return.rb', line 26 def cancelled? !success? end |
#message ⇒ String
The Message from Newebpay
35 36 37 38 39 |
# File 'lib/offsite_payments/integrations/newebpay/return.rb', line 35 def return unless valid? trade_info['Message'] end |
#success? ⇒ TrueClass|FalseClass
Does payment success
17 18 19 |
# File 'lib/offsite_payments/integrations/newebpay/return.rb', line 17 def success? valid? && params['Status'] == 'SUCCESS' end |