BUGFIX
This commit is contained in:
@@ -137,9 +137,7 @@ public class StripeSubscriptionServiceImpl implements StripeSubscriptionService
|
|||||||
long now = Instant.now().getEpochSecond();
|
long now = Instant.now().getEpochSecond();
|
||||||
boolean inPeriod = now > passedInfo.getCurrentPeriodStart() && now < passedInfo.getCurrentPeriodEnd();
|
boolean inPeriod = now > passedInfo.getCurrentPeriodStart() && now < passedInfo.getCurrentPeriodEnd();
|
||||||
// 续订失败的场景,可能订单状态已被更新为past_due
|
// 续订失败的场景,可能订单状态已被更新为past_due
|
||||||
boolean validStatus = "fail_renewal".equals(type)
|
boolean validStatus = "past_due".equals(passedInfo.getStatus()) || "active".equals(passedInfo.getStatus());
|
||||||
? ("past_due".equals(passedInfo.getStatus()) || "active".equals(passedInfo.getStatus()))
|
|
||||||
: "active".equals(passedInfo.getStatus());
|
|
||||||
if (inPeriod && validStatus) {
|
if (inPeriod && validStatus) {
|
||||||
return passedInfo;
|
return passedInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user