class PaymentNotificationsController < ApplicationController # Paypal needs to be able to access this without passing the auth token protect_from_forgery :except => [:create] unloadable def index create() end def create begin pm = PaymentHandler.create!(:params => params) if pm.accept? head :accepted else Rails.logger.fatal("Failed Transaction for cart_id #{pm.cart_id}: #{pm.errors}") head :bad_request end rescue => e Rails.logger.fatal(e) head :bad_request end end end