remove unused paypal.expired field

pull/2029/merge
Thibault Duplessis 2016-07-14 19:24:45 +02:00
parent ab2c05870c
commit 98c1a8308f
2 changed files with 1 additions and 4 deletions

View File

@ -46,7 +46,6 @@ object Patron {
email: Option[PayPal.Email],
subId: Option[PayPal.SubId],
lastCharge: DateTime) {
def isExpired = lastCharge isBefore DateTime.now.minusMonths(1)
}
object PayPal {
case class Email(value: String) extends AnyVal

View File

@ -164,9 +164,7 @@ final class PlanApi(
}
case (_, Some(paypal)) =>
if (paypal.isExpired)
patronColl.update($id(user.id), patron.removePayPal) >> sync(user)
else if (!paypal.isExpired && !user.plan.active) {
if (!user.plan.active) {
logger.warn(s"sync: enable plan of customer with paypal")
UserRepo.setPlan(user, user.plan.enable) inject ReloadUser
}