class Admin::FinancialAid::Stripe::PaymentsController < Admin::Controller
  def show
    if payment_service
      render_success :ok, json: payment_service
    else
      render_error :unprocessable_entity
    end
  end
  
  private
    def config
      @config ||= current_school.find_or_build_financial_aid_config
    end
    
    def payment_service
      @payment_service ||= Stripe::PaymentService.call(config, :show, nil, params)
    end
end
