summaryrefslogtreecommitdiff
path: root/server/lib/webhook/webhook.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/webhook/webhook.js')
-rw-r--r--server/lib/webhook/webhook.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/webhook/webhook.js b/server/lib/webhook/webhook.js
index 9e3a4d3..58a13ca 100644
--- a/server/lib/webhook/webhook.js
+++ b/server/lib/webhook/webhook.js
@@ -1,5 +1,4 @@
// // where should this live?
-// app.get('/subscribe/webhook', views.subscription.webhook);
/*
app.use(express.basicAuth(function(user, pass, callback) {
@@ -111,8 +110,8 @@ var subscribe = module.exports = {
*/
// payments
successful_payment_notification: function(data, user){
- var account = data.account
- user.last_charged = new Date(data.transaction.date)
+ var account = data.account[0]
+ user.last_charged = new Date(data.transaction[0].date[0]._)
user.save(function(){
})
},