mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-08 07:12:46 +00:00
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…
x
Reference in New Issue
Block a user