the form submits but an ajax error happens
This commit is contained in:
@@ -3,9 +3,11 @@ import { ajax } from "discourse/lib/ajax";
|
||||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
stripePaymentHandler(paymentMethodId, amount) {
|
||||
return ajax("/donate/charges", {
|
||||
return ajax("/patrons", {
|
||||
data: { paymentMethodId, amount },
|
||||
method: "post"
|
||||
}).catch(() => {
|
||||
return { error: 'An error occured while submitting the form.' };
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
<h3>{{i18n 'discourse_donations.title' site_name=siteSettings.title}}</h3>
|
||||
<h3>{{i18n 'discourse_patrons.title' site_name=siteSettings.title}}</h3>
|
||||
|
||||
<div class="donations-page-description">
|
||||
{{cook-text siteSettings.discourse_donations_page_description}}
|
||||
{{cook-text siteSettings.discourse_patrons_page_description}}
|
||||
</div>
|
||||
|
||||
<div class="donations-page-payment">
|
||||
|
||||
Reference in New Issue
Block a user