fix(amazon-payments): use lastBillingDate

This commit is contained in:
Matteo Pagliazzi 2015-07-05 11:17:40 +02:00
parent 12d5515879
commit 2fb25207bb

View file

@ -237,8 +237,8 @@ exports.subscribeCancel = function(req, res, next){
cancelSubscription: function(cb){
var data = {
user: user,
// Date of next bill, dateUpdated can be used because it's only updated when the user is billed
nextBill: moment(user.purchased.plan.dateUpdated).add({days: 30}),
// Date of next bill
nextBill: moment(user.purchased.plan.lastBillingDate).add({days: 30}),
paymentMethod: 'Amazon Payments'
};