Sha256: 97662d408d72e12ac3006d370f93543652a81b63901b74cf7df433db46bd92ba

Contents?: true

Size: 572 Bytes

Versions: 3

Compression:

Stored size: 572 Bytes

Contents

require_dependency "auth_net_receiver/application_controller"

module AuthNetReceiver
  class RawTransactionsController < ApplicationController

    skip_before_filter :verify_authenticity_token
    after_action :perform_job
  
    def create
      @raw_transaction = RawTransaction.create({
        :data => params.to_json
      })
      render :nothing => true, :status => 200
    end

private
    
    def perform_job
      if AuthNetReceiver.config.active_job
        AuthNetReceiver::ProcessTransactionJob.perform_later(@raw_transaction)
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
auth_net_receiver-1.0.1 app/controllers/auth_net_receiver/raw_transactions_controller.rb
auth_net_receiver-1.0.beta3 app/controllers/auth_net_receiver/raw_transactions_controller.rb
auth_net_receiver-1.0.beta2 app/controllers/auth_net_receiver/raw_transactions_controller.rb