Sha256: 4eb942551a732b45465b065a511dbb4a287dd31c2ffe41337a9c91861ea20657
Contents?: true
Size: 916 Bytes
Versions: 1
Compression:
Stored size: 916 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]) if params[:current_status] == 'paid' && params[:desired_status] == 'refunded' contribution.try(:invalid_refund) else delegator.change_status_by_transaction(params[:current_status]) delegator.update_fee end return render nothing: true, status: 200 end end render nothing: true, status: 404 end protected def contribution @contribution ||= PaymentEngines.find_payment({ payment_id: params[:id] }) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
catarse_pagarme-2.4.10 | app/controllers/catarse_pagarme/notifications_controller.rb |