From 5f4be822789dedcea67ba80560440d03a3590876 Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Wed, 29 Mar 2017 15:26:34 +1100 Subject: [PATCH] add challenge values to params --- .../javascripts/discourse/components/stripe-card.js.es6 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/components/stripe-card.js.es6 b/assets/javascripts/discourse/components/stripe-card.js.es6 index 0d813d9..ac2266c 100644 --- a/assets/javascripts/discourse/components/stripe-card.js.es6 +++ b/assets/javascripts/discourse/components/stripe-card.js.es6 @@ -67,12 +67,14 @@ export default Ember.Component.extend({ else { if(data.status == 'succeeded') { ajax('/users/hp', { method: 'get' }).then(data => { - let params = Ember.assign(data, { + let params = { email: self.get('email'), username: self.get('username'), name: self.get('name'), - password: self.get('password') - }); + password: self.get('password'), + password_confirmation: data.value, + challenge: data.challenge.split('').reverse().join(''), + }; ajax('/users', { data: params, method: 'post' }).then(data => { self.set('success', data.success);