com.liferay.commerce.payment.engine.CommercePaymentEngine Maven / Gradle / Ivy
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.commerce.payment.engine;
import com.liferay.commerce.model.CommerceOrder;
import com.liferay.commerce.payment.method.CommercePaymentMethod;
import com.liferay.commerce.payment.result.CommercePaymentResult;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.theme.ThemeDisplay;
import java.util.List;
import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
/**
* @author Luca Pellizzon
*/
public interface CommercePaymentEngine {
public CommercePaymentResult cancelPayment(
long commerceOrderId, String transactionId,
HttpServletRequest httpServletRequest)
throws Exception;
public CommercePaymentResult capturePayment(
long commerceOrderId, String transactionId,
HttpServletRequest httpServletRequest)
throws Exception;
public CommercePaymentResult completePayment(
long commerceOrderId, String transactionId,
HttpServletRequest httpServletRequest)
throws Exception;
public String getCommerceOrderPaymentMethodName(
CommerceOrder commerceOrder, HttpServletRequest httpServletRequest,
Locale locale)
throws PortalException;
public int getCommercePaymentMethodGroupRelsCount(long groupId);
public int getCommercePaymentMethodType(long commerceOrderId)
throws Exception;
public List getEnabledCommercePaymentMethodsForOrder(
long groupId, long commerceOrderId)
throws PortalException;
public String getPaymentMethodImageURL(
long groupId, String paymentMethodKey, ThemeDisplay themeDisplay)
throws PortalException;
public String getPaymentMethodName(String paymentMethodKey, Locale locale);
public CommercePaymentResult partiallyRefundPayment(
long commerceOrderId, String transactionId,
HttpServletRequest httpServletRequest)
throws Exception;
public CommercePaymentResult postProcessPayment(
long commerceOrderId, String transactionId,
HttpServletRequest httpServletRequest)
throws Exception;
public CommercePaymentResult processPayment(
long commerceOrderId, String nextUrl,
HttpServletRequest httpServletRequest)
throws Exception;
public CommercePaymentResult refundPayment(
long commerceOrderId, String transactionId,
HttpServletRequest httpServletRequest)
throws Exception;
public CommerceOrder updateOrderPaymentStatus(
long commerceOrderId, int paymentStatus, String transactionId,
String result)
throws PortalException;
public CommercePaymentResult voidTransaction(
long commerceOrderId, String transactionId,
HttpServletRequest httpServletRequest)
throws Exception;
}