Sha256: 8c418abee525fae32f20874ce4c4d7f797e31d5dd18ad61e9090c6c815c6d011

Contents?: true

Size: 589 Bytes

Versions: 9

Compression:

Stored size: 589 Bytes

Contents

module CatarsePagarme
  class NotificationsController < CatarsePagarme::ApplicationController
    skip_before_filter :authenticate_user!
    skip_before_filter :force_http

    def create
      if contribution
        contribution.payment_notifications.create(extra_data: params.to_json)

        if PagarMe::validate_fingerprint(contribution.try(:payment_id), params[:fingerprint])
          delegator.change_status_by_transaction(params[:current_status])
          return render nothing: true, status: 200
        end
      end

      render nothing: true, status: 404
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
catarse_pagarme-2.0.0 app/controllers/catarse_pagarme/notifications_controller.rb
catarse_pagarme-1.0.1 app/controllers/catarse_pagarme/notifications_controller.rb
catarse_pagarme-1.0.0 app/controllers/catarse_pagarme/notifications_controller.rb
catarse_pagarme-0.1.8 app/controllers/catarse_pagarme/notifications_controller.rb
catarse_pagarme-0.1.7 app/controllers/catarse_pagarme/notifications_controller.rb
catarse_pagarme-0.1.6 app/controllers/catarse_pagarme/notifications_controller.rb
catarse_pagarme-0.1.5 app/controllers/catarse_pagarme/notifications_controller.rb
catarse_pagarme-0.1.4 app/controllers/catarse_pagarme/notifications_controller.rb
catarse_pagarme-0.1.3 app/controllers/catarse_pagarme/notifications_controller.rb