class OffsitePayments::Integrations::Citrus::Return
Public Class Methods
new(query_string, options = {})
click to toggle source
Calls superclass method
OffsitePayments::Return::new
# File lib/offsite_payments/integrations/citrus.rb, line 195 def initialize(query_string, options = {}) super @notification = Notification.new(query_string, options) end
Public Instance Methods
cancelled?()
click to toggle source
# File lib/offsite_payments/integrations/citrus.rb, line 220 def cancelled? @notification.status == 'Failed' end
message()
click to toggle source
# File lib/offsite_payments/integrations/citrus.rb, line 216 def message @notification.message end
status( order_id, order_amount )
click to toggle source
# File lib/offsite_payments/integrations/citrus.rb, line 204 def status( order_id, order_amount ) if @notification.invoice_ok?( order_id ) && @notification.amount_ok?(BigDecimal(order_amount)) @notification.status else 'Mismatch' end end
success?()
click to toggle source
# File lib/offsite_payments/integrations/citrus.rb, line 212 def success? status( @params['TxId'], @params['amount'] ) == 'Completed' end
transaction_id()
click to toggle source
# File lib/offsite_payments/integrations/citrus.rb, line 200 def transaction_id @notification.transaction_id end