Class DefaultTransactionWebhookMessageService

java.lang.Object
com.broadleafcommerce.paymenttransaction.service.messaging.transactionwebhook.DefaultTransactionWebhookMessageService
All Implemented Interfaces:
TransactionWebhookMessageService

public class DefaultTransactionWebhookMessageService extends Object implements TransactionWebhookMessageService
Default implementation for TransactionWebhookMessageService.
Author:
Dima Myroniuk (dmyroniuk)
  • Constructor Details

    • DefaultTransactionWebhookMessageService

      public DefaultTransactionWebhookMessageService(PaymentTransactionRepository<com.broadleafcommerce.data.tracking.core.Trackable> paymentTransactionRepository, com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager, TransactionWebhookNotificationRepository transactionWebhookNotificationRepository)
  • Method Details

    • sendTransactionWebhookMessage

      public void sendTransactionWebhookMessage(@NonNull @NonNull String paymentTransactionContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: TransactionWebhookMessageService
      Sends a message communicating the transaction's results.
      Specified by:
      sendTransactionWebhookMessage in interface TransactionWebhookMessageService
      Parameters:
      paymentTransactionContextId - the ID of the payment transaction
      contextInfo - Request context information around sandbox and multitenant state
    • sendTransactionWebhookMessage

      public void sendTransactionWebhookMessage(@NonNull @NonNull Payment payment, @NonNull @NonNull PaymentTransaction transaction, boolean transactionRequiredExternalInteraction, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: TransactionWebhookMessageService
      Sends the message of PaymentTransactionResultWebhookProducer#TYPE type, notifying the system that a payment transaction has results recorded via the webhook.
      Specified by:
      sendTransactionWebhookMessage in interface TransactionWebhookMessageService
      Parameters:
      payment - the payment owning the transaction
      transaction - the payment transaction that recieved results
      transactionRequiredExternalInteraction - whether or not this transaction required external interaction
      contextInfo - Request context information around sandbox and multitenant state
    • buildTransactionResultSummary

      protected TransactionResultEvent buildTransactionResultSummary(@NonNull @NonNull Payment payment, @NonNull @NonNull PaymentTransaction transaction, boolean transactionRequiredExternalInteraction, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getPaymentTransactionRepository

      protected PaymentTransactionRepository<com.broadleafcommerce.data.tracking.core.Trackable> getPaymentTransactionRepository()
    • getNotificationStateService

      protected com.broadleafcommerce.common.messaging.notification.NotificationStateService getNotificationStateService()
    • getNotificationManager

      protected com.broadleafcommerce.common.messaging.notification.NotificationManager getNotificationManager()
    • getTransactionWebhookNotificationRepository

      protected TransactionWebhookNotificationRepository getTransactionWebhookNotificationRepository()
    • getPaymentTransactionService

      protected PaymentTransactionService<PaymentTransaction> getPaymentTransactionService()
    • setPaymentTransactionService

      @Autowired public void setPaymentTransactionService(PaymentTransactionService<PaymentTransaction> paymentTransactionService)
    • getPaymentService

      protected PaymentService<Payment> getPaymentService()
    • setPaymentService

      @Autowired public void setPaymentService(PaymentService<Payment> paymentService)
    • getDurableMessageSender

      protected com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender getDurableMessageSender()
    • setDurableMessageSender

      @Autowired public void setDurableMessageSender(com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender durableMessageSender)
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • setTypeFactory

      @Autowired public void setTypeFactory(com.broadleafcommerce.common.extension.TypeFactory typeFactory)