Sha256: 26ccc10e0771d73ba65c060dd80d0c704fddadf14e1166a6a0c105a2e7886a0c

Contents?: true

Size: 652 Bytes

Versions: 4

Compression:

Stored size: 652 Bytes

Contents

module Spree
  class PagSeguroController < Spree::CheckoutController
    protect_from_forgery :except => [:confirm]
    skip_before_filter :persist_gender
    
    def confirm
      email = Spree::PagSeguro::Config.email
      token = Spree::PagSeguro::Config.token
      notification_code = params[:notificationCode]
      notification = PagSeguro::Notification.new(email, token, notification_code)
      raise "###########################\n\n\n\n\n#{notification.inspect}\n\n\n\n\n###########################"
      if notification.approved?
        order = Spree::Order.find(notification.id)
      end
    end
    
    def callback
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_pag_seguro-1.0.0.beta6 app/controllers/spree/pag_seguro_controller.rb
spree_pag_seguro-1.0.0.beta5 app/controllers/spree/pag_seguro_controller.rb
spree_pag_seguro-1.0.0.beta4 app/controllers/spree/pag_seguro_controller.rb
spree_pag_seguro-1.0.0.beta3 app/controllers/spree/pag_seguro_controller.rb