Sha256: ca2f4c7d982f8e28bfb4d10fce8e00351b1133bdf95eafb53d9fc172299dedc9

Contents?: true

Size: 603 Bytes

Versions: 1

Compression:

Stored size: 603 Bytes

Contents

module Spree
  class PagSeguroController < ApplicationController
    protect_from_forgery :except => [:notify]
    
    def notify
      email = Spree::PagSeguro::Config.email
      token = Spree::PagSeguro::Config.token
      notification_code = params[:notificationCode]
      raise notification_code.inspect
      
      notification = ::PagSeguro::Notification.new(email, token, notification_code)
      raise notification.inspect
      
      
      
      
      if notification.approved?
        order = Spree::Order.find(notification.id)
      end
    end
    
    def callback
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_pag_seguro-1.0.0.beta10 app/controllers/spree/pag_seguro_controller.rb