Class: ActiveMerchant::Billing::Integrations::SagePayForm::Return

Inherits:
Return
  • Object
show all
Defined in:
lib/active_merchant/billing/integrations/sage_pay_form/return.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

Returns a new instance of Return.



7
8
9
10
11
12
13
# File 'lib/active_merchant/billing/integrations/sage_pay_form/return.rb', line 7

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

Returns:

  • (Boolean)


19
20
21
# File 'lib/active_merchant/billing/integrations/sage_pay_form/return.rb', line 19

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

#messageObject



23
24
25
# File 'lib/active_merchant/billing/integrations/sage_pay_form/return.rb', line 23

def message
  @message || @notification.message
end

#success?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/active_merchant/billing/integrations/sage_pay_form/return.rb', line 15

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