Copied to clipboard

Flag this post as spam?

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


  • Bo Jacobsen 593 posts 2389 karma points
    Jun 01, 2022 @ 13:16
    Bo Jacobsen
    0

    New order is not visible but exists in the database and payment provider.

    Hi Matt.

    We are trying to figure out why a new order is not showing up in the backoffice and i know that there can be a million reasons why. But hopefully we can track it down together :)

    It's the first time we encounter this. There havent been any new orders after this happened, so we cannot tell if its consistent, just yet.


    The order is in the vendrOrder table, but the finalizeDate and transactionId is null and the paymentStatus is 0. The rest of the data is set.

    We use NETS EASY and in the webportal we can see the reservation from that order number and when i compare that transaction to the other successfully transactions, they look the same.


    At 11:58:45 the order is created in NETS EASY and at 11:59:05 the order is reserved with a response code = ACCEPTED.

    What i wonder about is that the time in the database the order is updated is 09:58:34. Are Vendr using universal time?

    When i look in the logs, i cannot find any errors around 11:58 +/- 20 min. But there is 2 logged informations i have absolutely no clue about or why they are logged.

    One at 11:58:33 "Executing Umbraco RouteDefinition controller" [Timing "689683f"]. The other at 11:58:34 "Finished" (467ms) [Timing "689683f"]. Both from Umbraco.Web.Mvc.UmbracoPageResult.


    So where to start?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 01, 2022 @ 13:35
    Matt Brailsford
    0

    Hi Bo,

    So first off, Vendr stores all it's dates in UTC format.

    With regards to what is happening, it could probably be a few things.

    1) Nets isn't notifying the site that a payment has come through. I'd tripple check your webhook configuration as per the docs here https://vendr.net/docs/payment-providers/nets/2.0.0/nets-easy/getting-started/configuring-nets/#webhook and make sure it is pointing to the actual site you are expecting it to (was it set up on dev, but now the staging the domain is different this needs updating)

    2) Is the order being updated but you have an event handler somewhere that is re-persisting the order but that is not fetching the latest order before it makes it's changes. It's possible that these could be happening at the exact same time and so the order got overwritten.

    3) Do you have a valid license on the domain that the webhook is requesting? If not, the requested URL could be limited to the max 20 test orders if it thinks it's in trial mode and so would throw a license exception (we recently found we weren't logging these which will be updated in a new release soon).

    I'd probably start with these first

    Hope these help

    Matt

  • Bo Jacobsen 593 posts 2389 karma points
    Jun 02, 2022 @ 07:08
    Bo Jacobsen
    0

    Hi Matt.

    Thanks for replying so quickly.

    1) The webhook seems fine. We actuelly got new orders in and the order we where missing (I'll explain after).

    2) We do have some event handlers.

    1 ValidationEventHandlerBase<ValidateOrderStatusChange> where we check if the changing orderstatus is allowed and only use SetFailMessage().

    2 NotificationEventHandlerBase<OrderStatusChangingNotification> where 1 of them is sending custom emails out, depending on the orderstatus changed to. The other one is capturing payment by using evt.Order.ApplyPaymentChanges(paymentResult) if the order is completed and the payment status is Autorized.

    1 NotificationEventHandlerBase<OrderFinalizedNotification> that is sending a custom print friendly email to the shop keeper if the order is finalized like _vendrApi.SendEmail(emailTemplate, evt.Order)

    1 NotificationEventHandlerBase<OrderSearchingNotification> but i dont think this is called in this senario?

    3) The licens is valid.


    We got 2 new orders today and the order that was missing, came through at 5:51 PM, but was created at 11:58 AM. So i went through the transaction in NETS EASY and saw that the transaction havent been updated, it still says that its reserved at 11:59 AM.

    The big question is then if one of the event handlers are interfering somehow.

    What happens if an event get an code exception, does that stop the order and log the error?

  • Bo Jacobsen 593 posts 2389 karma points
    Jun 02, 2022 @ 07:31
    Bo Jacobsen
    100

    Hi Matt.

    I just talked to NETS and found out that there was some webhook delays yesterday (why dinnt i just start with that)..

    If anyone should come across this, there is a site with all this information https://easy-status.developers.nets.eu/

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 02, 2022 @ 07:48
    Matt Brailsford
    0

    Hey Bo,

    You beat me to the punch. Given the order eventually showed up, this was screaming webhook delays to me so glad you were able to confirm this as the case.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft