/* * #%L * BroadleafCommerce Integration * %% * Copyright (C) 2009 - 2015 Broadleaf Commerce * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ /* * Copyright 2008-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.broadleafcommerce.core.payment.service; import org.broadleafcommerce.common.payment.PaymentGatewayType; import org.springframework.stereotype.Service; /** * @author gdiaz */ @Service("blNullPaymentGatewayHostedConfiguration") public class NullPaymentGatewayHostedConfigurationImpl implements NullPaymentGatewayHostedConfiguration { protected int failureReportingThreshold = 1; protected boolean performAuthorizeAndCapture = true; @Override public String getHostedRedirectUrl() { return "/hosted/null-checkout"; } @Override public String getHostedRedirectReturnUrl() { return "/null-checkout/hosted/return"; } @Override public boolean isPerformAuthorizeAndCapture() { return true; } @Override public void setPerformAuthorizeAndCapture(boolean performAuthorizeAndCapture) { this.performAuthorizeAndCapture = performAuthorizeAndCapture; } @Override public int getFailureReportingThreshold() { return failureReportingThreshold; } @Override public void setFailureReportingThreshold(int failureReportingThreshold) { this.failureReportingThreshold = failureReportingThreshold; } @Override public boolean handlesAuthorize() { return true; } @Override public boolean handlesCapture() { return false; } @Override public boolean handlesAuthorizeAndCapture() { return true; } @Override public boolean handlesReverseAuthorize() { return false; } @Override public boolean handlesVoid() { return false; } @Override public boolean handlesRefund() { return false; } @Override public boolean handlesPartialCapture() { return false; } @Override public boolean handlesMultipleShipment() { return false; } @Override public boolean handlesRecurringPayment() { return false; } @Override public boolean handlesSavedCustomerPayment() { return false; } @Override public boolean handlesMultiplePayments() { return false; } @Override public PaymentGatewayType getGatewayType() { return NullPaymentGatewayType.NULL_HOSTED_GATEWAY; } }