Interface ExternalCallPayPalCheckoutService

All Known Implementing Classes:
ExternalCallPayPalCheckoutServiceImpl

public interface ExternalCallPayPalCheckoutService
Author:
Elbert Bautista (elbertbautista)
  • Method Summary

    Modifier and Type
    Method
    Description
    call(PayPalRequest paymentRequest)
    Makes a request to PayPal
    com.paypal.base.rest.APIContext
    constructAPIContext(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
     
     
    com.paypal.api.payments.Amount
    getPayPalAmountFromOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
     
    com.paypal.api.payments.ItemList
    getPayPalItemListFromOrder(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO, boolean shouldPopulateShipping)
     
    com.paypal.api.payments.ShippingAddress
    getPayPalShippingAddress(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
     
    void
    setCommonDetailsResponse(com.paypal.api.payments.Payment response, org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO)
    Converts a PayPal payment into a PaymentResponseDTO
    void
    setCommonDetailsResponse(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 PaymentResponseDTO
      responseDTO - 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 of PayPalRequest is 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)