Vendr with AdyenCheckout failing to finalize order
w
Every once in a while after a customer successfully completes a transaction on the payment provider environment (Adyen in this case), for some reason the webhook which is called fails to return a 200 response to Adyen, which in turn results in Adyen not notifying Umbraco/Vendr that the transaction was successful so that the cart can be 'promoted' to an order in Vendr with the subsequent flow being triggered. This means the order remains in the Carts section of Vendr instead of the Orders section, the customer does not receive the e-mail notifying them that their order has been received and most importantly of all, the order is not sent to the third-party CRM for actual real-world processing. I have spent hours debugging the code of Vendr and AdyenCheckout to try and decipher why this is going wrong and cannot find an explanation. It seems that the
AdyenCheckoutPaymentProvider
class method
ProcessCallbackAsync()
gets to the expression
if (adyenEvent.Success) { ... }
but this most likely results in
false
seeing as the code inside this
if
expression doesn't execute for these specific transactions. Inside this block is where
SendNotificationReceivedMessage()
is invoked, causing a 200 response with body
[accepted]
to be returned to Adyen, which is what they need to know that the webhook was executed successfully and in order to continue with finalizing the order via
NotificationEventHandlerBase.Handle()
. However, inspecting the event body in the Adyen webhook event logs shows that the
notificationItems
object does in fact state
success: true
, so I really don't understand why the above code isn't being triggered, no matter how many times I use the "Retry" button from within the Adyen Customer Area.
Once again, this does not consistently occur but has done so a few times in the past few months and is very frustrating as there is no way that I know of how to manually cause the cart to be 'promoted' (i.e., finalized) in Vendr so that the flow (cart → order, e-mail, third-party CRM) can continue. Would it be realistic to request a "Convert to Order" button in the Carts overview section of Vendr, to gain more control?
(mock-ups!)