@Service(value="blPayPalCheckoutTransactionService")
public class PayPalCheckoutTransactionServiceImpl
extends org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService
implements org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionService
| Modifier and Type | Field and Description |
|---|---|
protected PayPalClientProvider |
clientProvider |
protected static org.apache.commons.logging.Log |
LOG |
protected ExternalCallPayPalCheckoutService |
payPalCheckoutService |
protected PayPalUtils |
utils |
| Constructor and Description |
|---|
PayPalCheckoutTransactionServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO |
authorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) |
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO |
authorizeAndCapture(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) |
protected PayPalAuthorizeResponse |
authorizeOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
Executes an
PaymentTransactionType.AUTHORIZE transaction based on the provided
PaymentRequestDTO |
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO |
capture(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) |
protected PayPalCaptureAuthResponse |
captureAuthorization(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
Executes a
PaymentTransactionType.CAPTURE for the provided Authorization |
protected PayPalCaptureOrderResponse |
captureOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
Executes an
PaymentTransactionType.AUTHORIZE_AND_CAPTURE transaction based on the
provided PaymentRequestDTO. |
protected void |
processException(Exception e,
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO paymentResponse,
org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
This method is responsible for levering the exception, paymentRequest, & transactionType to
populate the paymentResponse instead of allowing the exception to be thrown.
|
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO |
refund(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) |
protected PayPalRefundResponse |
refundPayment(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
Executes a
PaymentTransactionType.REFUND for the captured payment. |
protected PayPalAuthorizationRetrievalResponse |
retrieveAuthorization(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) |
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO |
reverseAuthorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) |
protected PayPalVoidAuthResponse |
voidAuthorization(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
Executes a
PaymentTransactionType.REVERSE_AUTH for the provided
Authorization object. |
protected org.broadleafcommerce.common.payment.dto.PaymentResponseDTO |
voidAuthorization(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest,
org.broadleafcommerce.common.payment.PaymentTransactionType transactionType) |
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO |
voidPayment(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) |
protected static final org.apache.commons.logging.Log LOG
protected ExternalCallPayPalCheckoutService payPalCheckoutService
protected PayPalClientProvider clientProvider
protected PayPalUtils utils
public PayPalCheckoutTransactionServiceImpl()
public org.broadleafcommerce.common.payment.dto.PaymentResponseDTO authorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
authorize in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionServiceauthorize in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionServicepublic org.broadleafcommerce.common.payment.dto.PaymentResponseDTO capture(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
capture in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionServicecapture in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionServicepublic org.broadleafcommerce.common.payment.dto.PaymentResponseDTO authorizeAndCapture(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
authorizeAndCapture in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionServiceauthorizeAndCapture in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionServicepublic org.broadleafcommerce.common.payment.dto.PaymentResponseDTO reverseAuthorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
reverseAuthorize in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionServicereverseAuthorize in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionServicepublic org.broadleafcommerce.common.payment.dto.PaymentResponseDTO voidPayment(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
voidPayment in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionServicevoidPayment in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionServicepublic org.broadleafcommerce.common.payment.dto.PaymentResponseDTO refund(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
refund in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionServicerefund in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionServiceprotected org.broadleafcommerce.common.payment.dto.PaymentResponseDTO voidAuthorization(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest,
org.broadleafcommerce.common.payment.PaymentTransactionType transactionType)
protected PayPalCaptureAuthResponse captureAuthorization(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
PaymentTransactionType.CAPTURE for the provided AuthorizationpaymentRequest - The request payload that should be used to form the transactionPayPalCaptureAuthResponseorg.broadleafcommerce.common.vendor.service.exception.PaymentExceptionprotected PayPalAuthorizeResponse authorizeOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
PaymentTransactionType.AUTHORIZE transaction based on the provided
PaymentRequestDTOpaymentRequest - The request payload that should be used to form the transactionPayPalAuthorizeResponse representing the final state of the transactionorg.broadleafcommerce.common.vendor.service.exception.PaymentExceptionprotected PayPalAuthorizationRetrievalResponse retrieveAuthorization(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
org.broadleafcommerce.common.vendor.service.exception.PaymentExceptionprotected PayPalCaptureOrderResponse captureOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
PaymentTransactionType.AUTHORIZE_AND_CAPTURE transaction based on the
provided PaymentRequestDTO. For PayPal, this captures the Order immediately with
no authorization.paymentRequest - The request payload that should be used to form the transactionPayPalCaptureOrderResponseorg.broadleafcommerce.common.vendor.service.exception.PaymentExceptionprotected PayPalVoidAuthResponse voidAuthorization(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
PaymentTransactionType.REVERSE_AUTH for the provided
Authorization object. For PayPal, this means voiding the original authorization.paymentRequest - The request payload that should be used to form the transactionPayPalVoidAuthResponseorg.broadleafcommerce.common.vendor.service.exception.PaymentExceptionprotected PayPalRefundResponse refundPayment(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
PaymentTransactionType.REFUND for the captured payment.paymentRequest - The request payload that should be used to form the transactionPayPalRefundResponseorg.broadleafcommerce.common.vendor.service.exception.PaymentExceptionprotected void processException(Exception e, org.broadleafcommerce.common.payment.dto.PaymentResponseDTO paymentResponse, org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
e - the exception indicating a failed payment gateway transactionpaymentResponse - the object that will hold the transaction resultspaymentRequest - the request that was used to execute the transactionCopyright © 2021. All rights reserved.