1
0
mirror of https://github.com/google/nomulus synced 2026-05-12 19:01:49 +00:00

Handle SPECIFIED renewal price w/token in check flow (#2651)

This is kinda nonsensical because this use case is trying to apply a
single use token multiple times in the same domain:check request --
like, trying to use a single-use token for both create, renew, and
transfer while having a $0 create price and a premium renewal price.

This change doesn't affect any actual business / costs, since SPECIFIED
token renewal prices were already set on the BillingRecurrence
This commit is contained in:
gbrodman
2025-01-28 13:31:29 -05:00
committed by GitHub
parent 120bcc33be
commit 2ceb52a7c4
2 changed files with 22 additions and 0 deletions

View File

@@ -287,6 +287,9 @@ public final class DomainPricingLogic {
|| token.getRenewalPriceBehavior().equals(RenewalPriceBehavior.NONPREMIUM)) {
return tld.getStandardRenewCost(dateTime).multipliedBy(years);
}
if (token.getRenewalPriceBehavior().equals(RenewalPriceBehavior.SPECIFIED)) {
return token.getRenewalPrice().get();
}
}
return getDomainCostWithDiscount(
domainPrices.isPremium(),