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
I am looking to implement a Notification Event Handler for when an order payment status moves to "Captured".
So far the closest I have found is the OrderUpdatedNotification event with the following:
if (evt.Order.OrderStatusCode == Vendr.Core.Models.OrderStatusCode.Ok &&
evt.Order.TransactionInfo.PaymentStatus.Value == Vendr.Core.Models.PaymentStatus.Captured)
But how can I prevent anything within that if statement from firing again if the order is updated? Am I using the wrong event?
You might be better off using the OrderTransactionUpdatedNotification which is fired whenever the transaction information of an order changes, including the payment status.
The event should provide a PaymentStatus property which has a From and To value on it so you can see what the status is changing from and to. You can then use this to ensure your event only triggers it's behavior when moving between specific payment statuses (ie, moving from Authorized to Captured.
Hope this helps
Thanks Matt - that sounds like what I was looking for!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted