catch the error and render charge json

This commit is contained in:
Rimian Perkins 2017-02-22 11:12:19 +11:00
parent d6a00ae888
commit 9ed1af4538
2 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,7 @@ module DiscoursePayments
# BadgeGranter.grant(badge, current_user)
render :json => { status: 'OK' }
render :json => charge
end
end
end

View File

@ -26,6 +26,8 @@ export default Ember.Component.extend({
ajax('/charges', { data: data, method: 'post' }).then(data => {
console.log(data);
}).catch(() => {
console.log('error');
});
}
});