class OffsitePayments::Integrations::WirecardCheckoutPage::Notification

def acknowledge

end
... log possible hacking attempt ...
else
... process order ... if notify.complete?
if notify.acknowledge

notify = WirecardCheckoutPageNotification.new(request.raw_post, options)
def ipn

Example:

ok or a fail.
apc arrives. WirecardCheckoutPage will verify that all the information we received are correct and will return a
Acknowledge the transaction to WirecardCheckoutPage. This method has to be called after a new
def acknowledge
  verify_response(params, @options[:secret])
end

def complete?

def complete?
  @paymentstate == 'SUCCESS'
end

def gross

the money amount we received in X.2 decimal.
def gross
  params['amount']
end

def item_id

def item_id
  params['xActiveMerchantOrderId']
end

def method_missing(method_id, *args)

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

def parse(post)

Take the posted data and move the relevant data into a hash
def parse(post)
  @raw = post.to_s
  for line in @raw.split('&')
    key, value = *line.scan( %r{^([A-Za-z0-9_.]+)\=(.*)$} ).flatten
    params[key] = CGI.unescape(value)
  end
end

def received_at

When was this payment received by the client.
def received_at
  nil
end

def response(umessage = nil)

def response(umessage = nil)
  if @message || umessage
    '<QPAY-CONFIRMATION-RESPONSE result="NOK" message="' + CGI.escapeHTML(umessage ? umessage : @message) + '"/>'
  else
    '<QPAY-CONFIRMATION-RESPONSE result="OK"/>'
  end
end

def status

def status
  case @paymentstate
    when 'SUCCESS'
      'Completed'
    when 'PENDING'
      'Pending'
    when 'CANCEL'
      'Cancelled'
    when 'FAILURE'
      'Failed'
    else
      'Error'
  end
end

def status_code

def status_code
  @paymentstate
end

def test?

Was this a test transaction?
def test?
  false
end

def transaction_id

def transaction_id
  params['orderNumber']
end