catch the error and render charge json
This commit is contained in:
parent
d6a00ae888
commit
9ed1af4538
|
@ -27,7 +27,7 @@ module DiscoursePayments
|
|||
|
||||
# BadgeGranter.grant(badge, current_user)
|
||||
|
||||
render :json => { status: 'OK' }
|
||||
render :json => charge
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,6 +26,8 @@ export default Ember.Component.extend({
|
|||
|
||||
ajax('/charges', { data: data, method: 'post' }).then(data => {
|
||||
console.log(data);
|
||||
}).catch(() => {
|
||||
console.log('error');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue