remove unused paypal.expired field
This commit is contained in:
parent
ab2c05870c
commit
98c1a8308f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue