Adding a log to check out what's going on with updating of sponsored subscriptions.

This commit is contained in:
Nick Winter 2015-05-25 09:58:25 -07:00
parent 1af308424f
commit bebe2dde21
2 changed files with 2 additions and 1 deletions

View file

@ -40,7 +40,7 @@ deaths = [
'Went to heaven prematurely.' 'Went to heaven prematurely.'
'Teleported out of the dungeon and fell to its death.' 'Teleported out of the dungeon and fell to its death.'
'Panic.' 'Panic.'
'Killed by a minotuar, while dressing up.' 'Killed by a minotaur, while dressing up.'
'Petrified by trying to help a cockatrice out of a pit.' 'Petrified by trying to help a cockatrice out of a pit.'
'Killed by a luckstone.' 'Killed by a luckstone.'
'Killed by a panther, while taking off clothes.' 'Killed by a panther, while taking off clothes.'

View file

@ -161,6 +161,7 @@ module.exports.setup = (app) ->
_.remove(stripeInfo.recipients, (s) -> s.userID is recipient.id) _.remove(stripeInfo.recipients, (s) -> s.userID is recipient.id)
options = options =
quantity: utils.getSponsoredSubsAmount(subscription.plan.amount, stripeInfo.recipients.length, stripeInfo.subscriptionID?) quantity: utils.getSponsoredSubsAmount(subscription.plan.amount, stripeInfo.recipients.length, stripeInfo.subscriptionID?)
console.log 'Updating sponsored subscription', stripeInfo.customerID, stripeInfo.sponsorSubscriptionID, options, 'from stripeInfo', stripeInfo, 'and subscription', subscription, 'for user', recipient.id, 'with sponsor', sponsor.id
stripe.customers.updateSubscription stripeInfo.customerID, stripeInfo.sponsorSubscriptionID, options, (err, subscription) => stripe.customers.updateSubscription stripeInfo.customerID, stripeInfo.sponsorSubscriptionID, options, (err, subscription) =>
if err if err
logStripeWebhookError(err) logStripeWebhookError(err)