Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sean Dooley 289 posts 528 karma points
    Nov 29, 2019 @ 11:21
    Sean Dooley
    0

    Best way to track when payment has been successful

    We are building an e-learning platform and looking to use TeaCommerce for the handling the e-commerce functionality. Part of the scope is to trigger an event when a payment has been successful.

    Looking at the documentation, https://docs.teacommerce.net/3.3.2/api/events/#net-events, there maybe a few options. For example

    NotificationCenter.Order.Finalizing/Finalized NotificationCenter.Order.PaymentStateChanging/Changed NotificationCenter.Order.OrderStatusChanging/Changed

    Would appreciate any advice on which event would be best?

    • Umbraco 7.15.3
    • TeaCommerce 3.3.3
  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Nov 29, 2019 @ 11:58
    Matt Brailsford
    100

    Hey Sean,

    There are couple of options for sure. I think the key question is what is your definition of successful payment?

    There are 2 events that would be useful depending on this.

    1. Finalized will fire when a checkout is complete and the payment provider has run and successfully completed, however depending on the configuration of the payment provider, this could just be an "Authorized" payment and so actual payment may not yet have been transferred.

    2. PaymentStateChanged will fire when the state of a transaction changes and so if you want to know when money has actually transferred, you could listen for the payment state changing to "Captured".

    These will be the events you want to work with, but as I say, it depends on your definition as to which will be the best option for you.

    Hope this helps

    Matt

  • Sean Dooley 289 posts 528 karma points
    Nov 29, 2019 @ 12:14
    Sean Dooley
    0

    Sounds like we should be listening to the PaymentStateChanged event. Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft