diff --git a/java/com/google/domain/registry/ui/server/registrar/RegistrarPaymentSetupAction.java b/java/com/google/domain/registry/ui/server/registrar/RegistrarPaymentSetupAction.java index 3ca10089c..72e42cfbc 100644 --- a/java/com/google/domain/registry/ui/server/registrar/RegistrarPaymentSetupAction.java +++ b/java/com/google/domain/registry/ui/server/registrar/RegistrarPaymentSetupAction.java @@ -23,7 +23,6 @@ import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableMap; import com.google.domain.registry.braintree.BraintreeRegistrarSyncer; import com.google.domain.registry.config.ConfigModule.Config; -import com.google.domain.registry.config.RegistryEnvironment; import com.google.domain.registry.model.registrar.Registrar; import com.google.domain.registry.request.Action; import com.google.domain.registry.request.JsonActionRunner; @@ -80,7 +79,6 @@ public final class RegistrarPaymentSetupAction implements Runnable, JsonAction { @Inject BraintreeRegistrarSyncer customerSyncer; @Inject JsonActionRunner jsonActionRunner; @Inject Registrar registrar; - @Inject RegistryEnvironment environment; @Inject @Config("brainframe") String brainframe; @Inject @Config("braintreeMerchantAccountIds") ImmutableMap accountIds; @Inject RegistrarPaymentSetupAction() {} @@ -96,12 +94,8 @@ public final class RegistrarPaymentSetupAction implements Runnable, JsonAction { return JsonResponseHelper.create(ERROR, "JSON request object must be empty"); } - // payment.js is hard-coded to display a specific SOY error template when encountering the - // following error messages. - if (environment == RegistryEnvironment.SANDBOX) { - // Prevent registrar customers from accidentally remitting payment via OT&E environment. - return JsonResponseHelper.create(ERROR, "sandbox"); - } else if (registrar.getBillingMethod() != Registrar.BillingMethod.BRAINTREE) { + // payment.js is hard-coded to display a specific SOY error template for certain error messages. + if (registrar.getBillingMethod() != Registrar.BillingMethod.BRAINTREE) { // Registrar needs to contact support to have their billing bit flipped. return JsonResponseHelper.create(ERROR, "not-using-cc-billing"); } diff --git a/javatests/com/google/domain/registry/ui/server/registrar/RegistrarPaymentSetupActionTest.java b/javatests/com/google/domain/registry/ui/server/registrar/RegistrarPaymentSetupActionTest.java index 3c41aaa84..86dc1b27b 100644 --- a/javatests/com/google/domain/registry/ui/server/registrar/RegistrarPaymentSetupActionTest.java +++ b/javatests/com/google/domain/registry/ui/server/registrar/RegistrarPaymentSetupActionTest.java @@ -22,7 +22,6 @@ import static org.mockito.Mockito.when; import com.google.common.collect.ImmutableMap; import com.google.domain.registry.braintree.BraintreeRegistrarSyncer; -import com.google.domain.registry.config.RegistryEnvironment; import com.google.domain.registry.model.registrar.Registrar; import com.google.domain.registry.testing.AppEngineRule; @@ -98,16 +97,6 @@ public class RegistrarPaymentSetupActionTest { "results", asList()); } - @Test - public void testSandboxEnvironment_returnsError() throws Exception { - action.environment = RegistryEnvironment.SANDBOX; - assertThat(action.handleJsonRequest(ImmutableMap.of())) - .containsExactly( - "status", "ERROR", - "message", "sandbox", - "results", asList()); - } - @Test public void testNotOnCreditCardBillingTerms_showsErrorPage() throws Exception { action.registrar =