Class: OffsitePayments::Integrations::WirecardCheckoutPage::Return

Inherits:
Return
  • Object
show all
Includes:
Common
Defined in:
lib/offsite_payments/integrations/wirecard_checkout_page.rb

Instance Attribute Summary

Attributes inherited from Return

#notification, #params

Instance Method Summary collapse

Methods included from Common

#message, #verify_response

Methods inherited from Return

#message, #parse

Constructor Details

#initialize(postdata, options = {}) ⇒ Return

Returns a new instance of Return.



335
336
337
338
339
# File 'lib/offsite_payments/integrations/wirecard_checkout_page.rb', line 335

def initialize(postdata, options = {})
  @params  = parse(postdata)
  @options = options
  verify_response(@params, options[:secret])
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_id, *args) ⇒ Object



353
354
355
# File 'lib/offsite_payments/integrations/wirecard_checkout_page.rb', line 353

def method_missing(method_id, *args)
  return params[method_id.to_s] if params.has_key?(method_id.to_s)
end

Instance Method Details

#cancelled?Boolean

Returns:

  • (Boolean)


345
346
347
# File 'lib/offsite_payments/integrations/wirecard_checkout_page.rb', line 345

def cancelled?
  @paymentstate == 'CANCEL'
end

#pending?Boolean

Returns:

  • (Boolean)


349
350
351
# File 'lib/offsite_payments/integrations/wirecard_checkout_page.rb', line 349

def pending?
  @paymentstate == 'PENDING'
end

#success?Boolean

Returns:

  • (Boolean)


341
342
343
# File 'lib/offsite_payments/integrations/wirecard_checkout_page.rb', line 341

def success?
  @paymentstate == 'SUCCESS'
end