diff --git a/app/controllers/billing_subscriptions_controller.rb b/app/controllers/billing_subscriptions_controller.rb index af1fbf26..68629c28 100644 --- a/app/controllers/billing_subscriptions_controller.rb +++ b/app/controllers/billing_subscriptions_controller.rb @@ -6,15 +6,6 @@ class BillingSubscriptionsController < ApplicationController before_action :authenticate_nonprofit_admin! - def create_trial - render JsonResp.new(params) do |_params| - requires(:nonprofit_id).as_int - requires(:stripe_plan_id).as_string - end.when_valid do |params| - InsertBillingSubscriptions.trial(params[:nonprofit_id], params[:stripe_plan_id]) - end - end - def create @nonprofit ||= Nonprofit.find(params[:nonprofit_id]) @subscription = BillingSubscription.create_with_stripe(@nonprofit, params[:billing_subscription]) diff --git a/config/routes.rb b/config/routes.rb index 74d71d59..9ebfa601 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -150,7 +150,6 @@ Rails.application.routes.draw do resource(:billing_subscription, only: [:create]) do post(:cancel) - post(:create_trial, on: :member) get(:cancellation) end