Merge branch 'messages' into staging

This commit is contained in:
Rimian Perkins 2017-03-13 15:26:56 +11:00
commit 3dd9f8c393
5 changed files with 11 additions and 3 deletions

View File

@ -41,6 +41,7 @@ export default Ember.Component.extend({
this.get('stripe').createToken(this.get('card')).then(data => {
self.set('result', null);
self.set('success', false);
if (data.error) {
self.set('result', data.error.message);
@ -54,6 +55,7 @@ export default Ember.Component.extend({
};
ajax('/charges', { data: params, method: 'post' }).then(data => {
if(data.status == 'succeeded') { self.set('success', true) };
self.set('transactionInProgress', false);
self.set('result', data.outcome.seller_message);
});

View File

@ -30,4 +30,8 @@
{{/if}}
</div>
</div>
{{#if success}}
<span>{{i18n 'discourse_donations.messages.success'}}</span>
{{/if}}
</form>

View File

@ -5,5 +5,5 @@ en:
amount: Betrag
card: Kreditkarte oder Bankkarte
submit: Spende bezahlen
currency: Currency
hide_zip_code: Hide Zip Code
messages:
success: Thank you for your donation!

View File

@ -5,3 +5,5 @@ en:
amount: Amount
card: Credit or debit card
submit: Make Payment
messages:
success: Thank you for your donation!

View File

@ -1,6 +1,6 @@
# name: discourse-donations
# about: Integrating Discourse with Stripe for donations
# version: 1.9.1
# version: 1.9.2
# url: https://github.com/choiceaustralia/discourse-donations
# authors: Rimian Perkins