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
ConstructorsConstructorDescriptionDefaultTransactionWebhookMessageService(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 TransactionResultEventbuildTransactionResultSummary(@NonNull Payment payment, @NonNull PaymentTransaction transaction, boolean transactionRequiredExternalInteraction, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSenderprotected com.broadleafcommerce.common.messaging.notification.NotificationManagerprotected com.broadleafcommerce.common.messaging.notification.NotificationStateServiceprotected PaymentService<Payment>protected PaymentTransactionRepository<com.broadleafcommerce.data.tracking.core.Trackable>protected PaymentTransactionService<PaymentTransaction>protected TransactionWebhookNotificationRepositoryprotected com.broadleafcommerce.common.extension.TypeFactoryvoidsendTransactionWebhookMessage(@NonNull Payment payment, @NonNull PaymentTransaction transaction, boolean transactionRequiredExternalInteraction, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Sends the message ofPaymentTransactionResultWebhookProducer#TYPEtype, notifying the system that a payment transaction has results recorded via the webhook.voidsendTransactionWebhookMessage(@NonNull String paymentTransactionContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Sends a message communicating the transaction's results.voidsetDurableMessageSender(com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender durableMessageSender) voidsetPaymentService(PaymentService<Payment> paymentService) voidsetPaymentTransactionService(PaymentTransactionService<PaymentTransaction> paymentTransactionService) voidsetTypeFactory(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:TransactionWebhookMessageServiceSends a message communicating the transaction's results.- Specified by:
sendTransactionWebhookMessagein 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:TransactionWebhookMessageServiceSends the message ofPaymentTransactionResultWebhookProducer#TYPEtype, notifying the system that a payment transaction has results recorded via the webhook.- Specified by:
sendTransactionWebhookMessagein 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)
-