mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-02-27 22:29:27 +00:00
24 lines
491 B
Ruby
24 lines
491 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscoursePatrons
|
|
class PlansController < ::Admin::AdminController
|
|
include DiscoursePatrons::Stripe
|
|
|
|
before_action :set_api_key
|
|
|
|
def create
|
|
plan = ::Stripe::Plan.create(
|
|
amount: params[:amount],
|
|
interval: params[:interval],
|
|
product: {
|
|
name: 'Gold special',
|
|
},
|
|
currency: SiteSetting.discourse_patrons_currency,
|
|
id: 'gold-special',
|
|
)
|
|
|
|
plan.to_json
|
|
end
|
|
end
|
|
end
|