Merge branch 'messages' into staging
This commit is contained in:
commit
3dd9f8c393
|
@ -41,6 +41,7 @@ export default Ember.Component.extend({
|
||||||
this.get('stripe').createToken(this.get('card')).then(data => {
|
this.get('stripe').createToken(this.get('card')).then(data => {
|
||||||
|
|
||||||
self.set('result', null);
|
self.set('result', null);
|
||||||
|
self.set('success', false);
|
||||||
|
|
||||||
if (data.error) {
|
if (data.error) {
|
||||||
self.set('result', data.error.message);
|
self.set('result', data.error.message);
|
||||||
|
@ -54,6 +55,7 @@ export default Ember.Component.extend({
|
||||||
};
|
};
|
||||||
|
|
||||||
ajax('/charges', { data: params, method: 'post' }).then(data => {
|
ajax('/charges', { data: params, method: 'post' }).then(data => {
|
||||||
|
if(data.status == 'succeeded') { self.set('success', true) };
|
||||||
self.set('transactionInProgress', false);
|
self.set('transactionInProgress', false);
|
||||||
self.set('result', data.outcome.seller_message);
|
self.set('result', data.outcome.seller_message);
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,4 +30,8 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#if success}}
|
||||||
|
<span>{{i18n 'discourse_donations.messages.success'}}</span>
|
||||||
|
{{/if}}
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -5,5 +5,5 @@ en:
|
||||||
amount: Betrag
|
amount: Betrag
|
||||||
card: Kreditkarte oder Bankkarte
|
card: Kreditkarte oder Bankkarte
|
||||||
submit: Spende bezahlen
|
submit: Spende bezahlen
|
||||||
currency: Currency
|
messages:
|
||||||
hide_zip_code: Hide Zip Code
|
success: Thank you for your donation!
|
||||||
|
|
|
@ -5,3 +5,5 @@ en:
|
||||||
amount: Amount
|
amount: Amount
|
||||||
card: Credit or debit card
|
card: Credit or debit card
|
||||||
submit: Make Payment
|
submit: Make Payment
|
||||||
|
messages:
|
||||||
|
success: Thank you for your donation!
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# name: discourse-donations
|
# name: discourse-donations
|
||||||
# about: Integrating Discourse with Stripe for donations
|
# about: Integrating Discourse with Stripe for donations
|
||||||
# version: 1.9.1
|
# version: 1.9.2
|
||||||
# url: https://github.com/choiceaustralia/discourse-donations
|
# url: https://github.com/choiceaustralia/discourse-donations
|
||||||
# authors: Rimian Perkins
|
# authors: Rimian Perkins
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue