From 72754ed88f7dfed9b80f5a46cd11550aac11cf1e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 2 Feb 2015 15:28:48 -0500 Subject: fix successful_payment_notification --- server/lib/webhook/webhook.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/lib/webhook/webhook.js') 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(){ }) }, -- cgit v1.2.3-70-g09d2