Interface ExternalCallPayPalCheckoutService
- All Known Implementing Classes:
ExternalCallPayPalCheckoutServiceImpl
public interface ExternalCallPayPalCheckoutService
- Author:
- Elbert Bautista (elbertbautista)
-
Method Summary
Modifier and TypeMethodDescriptioncall(PayPalRequest paymentRequest) Makes a request to PayPalcom.paypal.base.rest.APIContextconstructAPIContext(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) com.paypal.api.payments.AmountgetPayPalAmountFromOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) com.paypal.api.payments.ItemListgetPayPalItemListFromOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO, boolean shouldPopulateShipping) com.paypal.api.payments.ShippingAddressgetPayPalShippingAddress(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) voidsetCommonDetailsResponse(com.paypal.api.payments.Payment response, org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO) Converts a PayPal payment into a PaymentResponseDTOvoidsetCommonDetailsResponse(AgreementToken response, org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO, org.broadleafcommerce.common.money.Money amount, String orderId, boolean checkoutComplete)
-
Method Details
-
getConfiguration
PayPalCheckoutConfiguration getConfiguration() -
setCommonDetailsResponse
void setCommonDetailsResponse(AgreementToken response, org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO, org.broadleafcommerce.common.money.Money amount, String orderId, boolean checkoutComplete) -
setCommonDetailsResponse
void setCommonDetailsResponse(com.paypal.api.payments.Payment response, org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO) Converts a PayPal payment into a PaymentResponseDTO- Parameters:
response- A PayPal payment that should be used to be converted into a PaymentResponseDTOresponseDTO- The response dto that should be used to copy information from the PayPal payment
-
getPayPalShippingAddress
com.paypal.api.payments.ShippingAddress getPayPalShippingAddress(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) -
getPayPalItemListFromOrder
com.paypal.api.payments.ItemList getPayPalItemListFromOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO, boolean shouldPopulateShipping) -
getPayPalAmountFromOrder
com.paypal.api.payments.Amount getPayPalAmountFromOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) -
call
PayPalResponse call(PayPalRequest paymentRequest) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException Makes a request to PayPal- Parameters:
paymentRequest- The payment request that should be executed. The operation that is executed is depedent on which implementation ofPayPalRequestis sent- Returns:
- the respective PayPalResponse that corresponds to the given PayPalRequest
- Throws:
org.broadleafcommerce.common.vendor.service.exception.PaymentException
-
constructAPIContext
com.paypal.base.rest.APIContext constructAPIContext(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
-