Class DefaultPayPalCheckoutProvider
- java.lang.Object
-
- com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<PayPalRequest,PayPalResponse>
-
- com.broadleafcommerce.paypal.micro.gateway.service.provider.DefaultPayPalCheckoutProvider
-
- All Implemented Interfaces:
com.broadleafcommerce.paymentgateway.service.FailureCountExposable
,com.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<PayPalRequest>
,PayPalCheckoutProvider
public class DefaultPayPalCheckoutProvider extends com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<PayPalRequest,PayPalResponse> implements PayPalCheckoutProvider
- Author:
- Elbert Bautista (elbertbautista)
-
-
Constructor Summary
Constructors Constructor Description DefaultPayPalCheckoutProvider(PayPalCheckoutApiProperties properties, PayPalGatewayConfiguration gatewayConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends PayPalResponse>
Tcall(@NonNull PayPalRequest paymentRequest, @NonNull Class<T> responseType)
Makes a request to PayPalPayPalResponse
communicateWithVendor(@NonNull PayPalRequest paymentRequest)
Integer
getFailureReportingThreshold()
protected PayPalGatewayConfiguration
getGatewayConfiguration()
protected PayPalCheckoutApiProperties
getProperties()
String
getServiceName()
-
-
-
Constructor Detail
-
DefaultPayPalCheckoutProvider
public DefaultPayPalCheckoutProvider(PayPalCheckoutApiProperties properties, PayPalGatewayConfiguration gatewayConfiguration)
-
-
Method Detail
-
call
public <T extends PayPalResponse> T call(@NonNull @NonNull PayPalRequest paymentRequest, @NonNull @NonNull Class<T> responseType)
Description copied from interface:PayPalCheckoutProvider
Makes a request to PayPal- Specified by:
call
in interfacePayPalCheckoutProvider
- Parameters:
paymentRequest
- The payment request that should be executed. The operation that is executed is dependent on which implementation ofPayPalRequest
is sentresponseType
- The type of the response expected- Returns:
- the respective
PayPalResponse
that corresponds to the givenresponseType
-
communicateWithVendor
public PayPalResponse communicateWithVendor(@NonNull @NonNull PayPalRequest paymentRequest)
- Specified by:
communicateWithVendor
in classcom.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<PayPalRequest,PayPalResponse>
-
getServiceName
public String getServiceName()
- Specified by:
getServiceName
in interfacecom.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<PayPalRequest>
-
getFailureReportingThreshold
public Integer getFailureReportingThreshold()
- Specified by:
getFailureReportingThreshold
in interfacecom.broadleafcommerce.paymentgateway.service.FailureCountExposable
- Specified by:
getFailureReportingThreshold
in classcom.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<PayPalRequest,PayPalResponse>
-
getProperties
protected PayPalCheckoutApiProperties getProperties()
-
getGatewayConfiguration
protected PayPalGatewayConfiguration getGatewayConfiguration()
-
-