mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Require fee extension when registering domain in EAP
Failing to use the fee extension during EAP can result in charges to registrars that are radically different than what they may have been expecting. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177597883
This commit is contained in:
parent
087a500093
commit
ebfa27b3ad
4 changed files with 41 additions and 3 deletions
|
@ -631,6 +631,9 @@ public class DomainFlowUtils {
|
|||
// This only happens when the total fees are non-zero and include custom fees requiring the
|
||||
// extension.
|
||||
if (feeCommand == null) {
|
||||
if (!feesAndCredits.getEapCost().isZero()) {
|
||||
throw new FeesRequiredDuringEarlyAccessProgramException(feesAndCredits.getEapCost());
|
||||
}
|
||||
if (feesAndCredits.getTotalCost().isZero() || !feesAndCredits.isFeeExtensionRequired()) {
|
||||
return;
|
||||
}
|
||||
|
@ -1167,9 +1170,6 @@ public class DomainFlowUtils {
|
|||
|
||||
/** Fees must be explicitly acknowledged when performing an operation which is not free. */
|
||||
static class FeesRequiredForNonFreeOperationException extends RequiredParameterMissingException {
|
||||
FeesRequiredForNonFreeOperationException() {
|
||||
super("Fees must be explicitly acknowledged when performing an operation which is not free.");
|
||||
}
|
||||
|
||||
public FeesRequiredForNonFreeOperationException(Money expectedFee) {
|
||||
super(
|
||||
|
@ -1179,6 +1179,18 @@ public class DomainFlowUtils {
|
|||
}
|
||||
}
|
||||
|
||||
/** Fees must be explicitly acknowledged when creating domains during the Early Access Program. */
|
||||
static class FeesRequiredDuringEarlyAccessProgramException
|
||||
extends RequiredParameterMissingException {
|
||||
|
||||
public FeesRequiredDuringEarlyAccessProgramException(Money expectedFee) {
|
||||
super(
|
||||
"Fees must be explicitly acknowledged when creating domains "
|
||||
+ "during the Early Access Program. The EAP fee is: "
|
||||
+ expectedFee);
|
||||
}
|
||||
}
|
||||
|
||||
/** The 'grace-period', 'applied' and 'refundable' fields are disallowed by server policy. */
|
||||
static class UnsupportedFeeAttributeException extends UnimplementedOptionException {
|
||||
UnsupportedFeeAttributeException() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue