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 Summary
ConstructorDescriptionDefaultTransactionWebhookMessageService
(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 Summary
Modifier and TypeMethodDescriptionprotected TransactionResultEvent
buildTransactionResultSummary
(@NonNull Payment payment, @NonNull PaymentTransaction transaction, boolean transactionRequiredExternalInteraction, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender
protected com.broadleafcommerce.common.messaging.notification.NotificationManager
protected com.broadleafcommerce.common.messaging.notification.NotificationStateService
protected PaymentService<Payment>
protected PaymentTransactionRepository<com.broadleafcommerce.data.tracking.core.Trackable>
protected PaymentTransactionService<PaymentTransaction>
protected TransactionWebhookNotificationRepository
protected com.broadleafcommerce.common.extension.TypeFactory
void
sendTransactionWebhookMessage
(@NonNull Payment payment, @NonNull PaymentTransaction transaction, boolean transactionRequiredExternalInteraction, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Sends the message ofPaymentTransactionResultWebhookProducer#TYPE
type, notifying the system that a payment transaction has results recorded via the webhook.void
sendTransactionWebhookMessage
(@NonNull String paymentTransactionContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Sends a message communicating the transaction's results.void
setDurableMessageSender
(com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender durableMessageSender) void
setPaymentService
(PaymentService<Payment> paymentService) void
setPaymentTransactionService
(PaymentTransactionService<PaymentTransaction> paymentTransactionService) void
setTypeFactory
(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
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 interfaceTransactionWebhookMessageService
- Parameters:
paymentTransactionContextId
- the ID of the payment transactioncontextInfo
- 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 ofPaymentTransactionResultWebhookProducer#TYPE
type, notifying the system that a payment transaction has results recorded via the webhook.- Specified by:
sendTransactionWebhookMessage
in interfaceTransactionWebhookMessageService
- Parameters:
payment
- the payment owning the transactiontransaction
- the payment transaction that recieved resultstransactionRequiredExternalInteraction
- whether or not this transaction required external interactioncontextInfo
- 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
-
getPaymentTransactionService
-
setPaymentTransactionService
@Autowired public void setPaymentTransactionService(PaymentTransactionService<PaymentTransaction> paymentTransactionService) -
getPaymentService
-
setPaymentService
-
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)
-