diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-02-02 15:28:48 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-02-02 15:28:48 -0500 |
| commit | 72754ed88f7dfed9b80f5a46cd11550aac11cf1e (patch) | |
| tree | ff41cbec3f2fe81d7c160a541136163c70651edc | |
| parent | 6a4e4d30d5428fd0e629081d6a214e9a618ab52f (diff) | |
fix successful_payment_notification
| -rw-r--r-- | server/lib/webhook/webhook.js | 5 |
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(){ }) }, |
