From 381315f9f3bd5cd6ca583d9f9b18218915d12c12 Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Wed, 11 Sep 2019 22:06:01 +1000 Subject: [PATCH] add settings --- .../controllers/patrons-index.js.es6 | 2 +- config/settings.yml | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/controllers/patrons-index.js.es6 b/assets/javascripts/discourse/controllers/patrons-index.js.es6 index 1ba8610..7011509 100644 --- a/assets/javascripts/discourse/controllers/patrons-index.js.es6 +++ b/assets/javascripts/discourse/controllers/patrons-index.js.es6 @@ -3,7 +3,7 @@ import { ajax } from "discourse/lib/ajax"; export default Ember.Controller.extend({ actions: { stripePaymentHandler(paymentMethodId, amount) { - return ajax("/patrons", { + return ajax("/patrons/patrons", { data: { paymentMethodId, amount }, method: "post" }).catch(() => { diff --git a/config/settings.yml b/config/settings.yml index f713bd1..540be3b 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -1,3 +1,23 @@ plugins: discourse_patrons_enabled: default: false + discourse_patrons_secret_key: + default: '' + client: false + discourse_patrons_public_key: + default: '' + client: true + discourse_patrons_description: + client: true + default: '' + discourse_patrons_currency: + client: true + default: "USD" + type: enum + choices: + - AUD + - CAD + - EUR + - JPY + - GBP + - USD