Copied to clipboard

Flag this post as spam?

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


  • Daniel Nielsen 17 posts 102 karma points notactivated
    Nov 07, 2022 @ 14:05
    Daniel Nielsen
    1

    Quickpay - Order status is wrong

    Hi.

    Im experiencing an order status "error" when paying with Quickpay.

    Quickpay is auto capturing all orders from my shop.

    An order looks like this in Quickpay where Status Authrize and Capture is happening at the same millisecond.

    enter image description here

    And the order in Vendr have this status

    enter image description here

    It should have the payment status captured.

    Its important to mention that this happens very random, sometimes an order gets the Captured status

    So my theory is that because an order in quickpay is updating the status at the same time, Vendr is just taking the Status that get updated last.

    Is there a way to handle this, so i maybe could call the quickpay api and get the correct status?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Nov 07, 2022 @ 15:08
    Matt Brailsford
    0

    Hi Daniel,

    If the payment provider has the Fetch Payment Status feature enabled, when you open the order it should attempt to re-sync the order status.

    Additionally, and what really should be happening is if the payment updates in QuickPay it probably should be notifying the webhook of the update and so the order should auto update the status. But maybe these are happning too fast that the it's getting notified whilst it's persisting the original update and so it gets missed 🤔

    It would be good to try and narrow down how it's missing the update to captured

  • Daniel Nielsen 17 posts 102 karma points notactivated
    Nov 08, 2022 @ 13:58
    Daniel Nielsen
    0

    Hi Matt.

    I fixed it by disabling Auto Capture, and instead allowed for Fetch Payment Status.

    And then in my handler for OrderTransactionUpdatedNotification running this code i found in an earlier Vendr Umbraco question.

               var order = _vendrApi.GetOrder(evt.Order.Id);
    
               var result = await _vendrApi.CaptureOrderPaymentAsync(order);
    
                if (result.Success)
                {
                    using (var uow = _vendrApi.Uow.Create())
                    {
                        var writableOrder = order.AsWritable(uow)
                            .ApplyPaymentChanges(result);
    
                        _vendrApi.SaveOrder(writableOrder);
    
                        uow.Complete();
                    }
                }
    

    This fixed my problem

Please Sign in or register to post replies

Write your reply to:

Draft