show success message
This commit is contained in:
@@ -47,6 +47,8 @@ module DiscourseDonations
|
||||
end
|
||||
|
||||
if charge['paid'] == true || charge['status'] == 'active'
|
||||
output['success'] = true
|
||||
|
||||
output['messages'] << I18n.t('donations.payment.success')
|
||||
|
||||
output['rewards'] << { type: :group, name: group_name } if group_name
|
||||
|
||||
@@ -90,6 +90,9 @@ export default Ember.Component.extend({
|
||||
ajax('/charges', { data: params, method: 'post' }).then(data => {
|
||||
self.concatMessages(data.messages);
|
||||
self.endTranscation();
|
||||
if(data.success) {
|
||||
self.setSuccess();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,9 @@
|
||||
{{/each}}
|
||||
|
||||
{{#if success}}
|
||||
<p>{{i18n 'discourse_donations.messages.success'}}</p>
|
||||
{{#if create_accounts}}
|
||||
<p>Please <strong>check your email</strong> to get your log in link.</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user