mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Allow domain transfers with 0 period and in auto-renew grace period
Normally, if a domain is in the auto-renew grace period, a transfer will cancel the auto-renew billing event. In the event of a transfer with no change to registration end date, the auto-renew billing event should not be cancelled and the gaining registrar should not be charged for the transfer. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=170576726
This commit is contained in:
parent
3c0b17dc6f
commit
7aa5629517
9 changed files with 120 additions and 50 deletions
|
@ -138,8 +138,15 @@ public final class DomainTransferApproveFlow implements TransactionalFlow {
|
|||
int extraYears = transferData.getTransferPeriod().getValue();
|
||||
if (autorenewGrace != null) {
|
||||
extraYears = 0;
|
||||
ofy().save().entity(
|
||||
BillingEvent.Cancellation.forGracePeriod(autorenewGrace, historyEntry, targetId));
|
||||
// During a normal transfer, if the domain is in the auto-renew grace period, the auto-renew
|
||||
// billing event is cancelled and the gaining registrar is charged for the one year renewal.
|
||||
// But, if the superuser extension is used to request a transfer without an additional year
|
||||
// then the gaining registrar is not charged for the one year renewal and the losing registrar
|
||||
// still needs to be charged for the auto-renew.
|
||||
if (billingEvent.isPresent()) {
|
||||
ofy().save().entity(
|
||||
BillingEvent.Cancellation.forGracePeriod(autorenewGrace, historyEntry, targetId));
|
||||
}
|
||||
}
|
||||
// Close the old autorenew event and poll message at the transfer time (aka now). This may end
|
||||
// up deleting the poll message.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue