mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-02-10 05:24:56 +00:00
21 lines
394 B
Ruby
21 lines
394 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscoursePatrons
|
|
class PlansController < ::ApplicationController
|
|
include DiscoursePatrons::Stripe
|
|
|
|
before_action :set_api_key
|
|
|
|
def index
|
|
begin
|
|
plans = ::Stripe::Plan.list
|
|
|
|
render_json_dump plans.data
|
|
|
|
rescue ::Stripe::InvalidRequestError => e
|
|
return render_json_error e.message
|
|
end
|
|
end
|
|
end
|
|
end
|