Class DefaultSavedPaymentMethodWebhookService

java.lang.Object
com.broadleafcommerce.paymenttransaction.service.webhook.DefaultSavedPaymentMethodWebhookService
All Implemented Interfaces:
SavedPaymentMethodWebhookService

public class DefaultSavedPaymentMethodWebhookService extends Object implements SavedPaymentMethodWebhookService
The default implementation of SavedPaymentMethodWebhookService.
Author:
Dima Myroniuk (dmyroniuk)
  • Constructor Details

    • DefaultSavedPaymentMethodWebhookService

      public DefaultSavedPaymentMethodWebhookService(com.broadleafcommerce.paymentgateway.service.provider.PaymentGatewayResourceProvider paymentGatewayResourceProvider, SavedPaymentMethodService<SavedPaymentMethod> savedPaymentMethodService)
  • Method Details

    • handleWebhook

      public org.springframework.http.ResponseEntity<?> handleWebhook(String gatewayType, org.springframework.http.HttpHeaders headers, String rawRequestBody, Map<String,String> parameters)
      Description copied from interface: SavedPaymentMethodWebhookService
      Handles the saved payment method webhook request for the specified gateway type.
      Specified by:
      handleWebhook in interface SavedPaymentMethodWebhookService
      Parameters:
      gatewayType - the gateway type that is used to identify the appropriate PaymentGatewaySavedPaymentMethodWebhookHandler
      headers - the webhook request headers
      rawRequestBody - the webhook request body
      parameters - the webhook request parameters
      Returns:
      a ResponseEntity meant to communicate to the gateway with the processing result of the webhook.
    • updateSavedPaymentMethodForResult

      protected void updateSavedPaymentMethodForResult(com.broadleafcommerce.paymentgateway.domain.SavedPaymentMethodSetupResult savedPaymentMethodSetupResult)
    • updateSavedPaymentMethodForResult

      protected SavedPaymentMethod updateSavedPaymentMethodForResult(com.broadleafcommerce.paymentgateway.domain.SavedPaymentMethodSetupResult savedPaymentMethodSetupResult, SavedPaymentMethod savedPaymentMethod, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • replaceSavedPaymentMethod

      protected SavedPaymentMethod replaceSavedPaymentMethod(SavedPaymentMethod savedPaymentMethod, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getContextInfo

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo getContextInfo(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.SavedPaymentMethodSetupResult savedPaymentMethodSetupResult)
    • buildErrorResponse

      protected org.springframework.http.ResponseEntity<?> buildErrorResponse(@Nullable com.broadleafcommerce.paymentgateway.service.PaymentGatewaySavedPaymentMethodWebhookHandler webhookHandler, @NonNull @NonNull Exception e)
    • getPaymentGatewayResourceProvider

      protected com.broadleafcommerce.paymentgateway.service.provider.PaymentGatewayResourceProvider getPaymentGatewayResourceProvider()
    • getSavedPaymentMethodService

      protected SavedPaymentMethodService<SavedPaymentMethod> getSavedPaymentMethodService()