Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
Would appreciate any advice on which event would be best?
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.
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.
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
Sounds like we should be listening to the PaymentStateChanged event. Thanks.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted