Class: OffsitePayments::Integrations::SagePayForm::Return

Inherits:
Return
  • Object
show all
Defined in:
lib/offsite_payments/integrations/sage_pay_form.rb

Instance Attribute Summary

Attributes inherited from Return

#notification, #params

Instance Method Summary collapse

Methods inherited from Return

#parse

Constructor Details

#initialize(query_string, options) ⇒ Return


403
404
405
406
407
408
409
# File 'lib/offsite_payments/integrations/sage_pay_form.rb', line 403

def initialize(query_string, options)
  begin
    @notification = Notification.new(query_string, options)
  rescue Notification::CryptError => e
    @message = e.message
  end
end

Instance Method Details

#cancelled?Boolean


415
416
417
# File 'lib/offsite_payments/integrations/sage_pay_form.rb', line 415

def cancelled?
  @notification && @notification.cancelled?
end

#messageObject


419
420
421
# File 'lib/offsite_payments/integrations/sage_pay_form.rb', line 419

def message
  @message || @notification.message
end

#success?Boolean


411
412
413
# File 'lib/offsite_payments/integrations/sage_pay_form.rb', line 411

def success?
  @notification && @notification.complete?
end