Copied to clipboard

Flag this post as spam?

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


  • Chris de Ruiter 4 posts 85 karma points
    Jun 14, 2022 @ 09:05
    Chris de Ruiter
    1

    SEPA orders not finalized

    Hi Matt,

    Yesterday our shop went into production, now we got an issue with SEPA/manual transfer paid orders.

    When orders are paid by manual transfer (in Mollie) the order is never finalized until the order is paid, the entire order remains in the shop as a shopping cart. What you would expect was a finalized order with the status 'pending'. (What a Vendr payment status is)

    Now this could be a misconfiguration in our shop and might need a little bit help on this.

    We are on U8, Vendr 2.1.0.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 15, 2022 @ 05:20
    Matt Brailsford
    0

    Hi Chris

    Hmm, this may be something we haven’t considered in the Mollie provider.

    I’m currently away at CodeGarden this week so I’m not fully in a position to debug this easily. My best suggestion currently would be to maybe pull the Mollie provider source and run a custom build to see where it’s failing. My guess is there is likely a webhook status we aren’t handling or something like that.

    https://github.com/vendrhub/vendr-payment-provider-mollie

    I’d see if Mollie have a test scenario for testing SEPA payments and see if you can replicate it locally.

    Let me know if you’re unable to resolve it however and I’ll see if I can jump in.

  • anh-duc-le 36 posts 150 karma points
    Feb 07, 2023 @ 15:30
    anh-duc-le
    0

    Our client wants to support SEPA / manual payment transfers on orders as well.

    Hmm, this may be something we haven’t considered in the Mollie provider.

    Does this comment mean that the Vendr Mollie provider currently wouldn't support putting these orders on the status Pending out of the box?

  • Chris de Ruiter 4 posts 85 karma points
    Jun 16, 2022 @ 12:37
    Chris de Ruiter
    0

    Hi Matt,

    As work arround we finalize the order on our side by setting the FinalizeData by a sql query.

    This results in a order in the BO, but as soon as we save that order, the finalize date is null again. (and also an map error is throwing)

    Do we miss something here?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 16, 2022 @ 13:54
    Matt Brailsford
    100

    Hi Chris,

    There is a method on a writable order to finalize it (I can’t recall it of the top of my head) but maybe review the order autocomplete methods to find it. That should safely finalize the order.

    Alternatively, you’re likely having problems because of the cache so you’d want to flush the cache once you’ve set the date.

    The method on the order would be the safest bet though

    (Again apologies I can’t give full snippet right as it’s still Codegarden)

  • Chris de Ruiter 4 posts 85 karma points
    Jun 17, 2022 @ 08:33
    Chris de Ruiter
    0

    Hi Matt,

    We tried both options, the first solution didn't really work out.

     using var uow = _uowProvider.Create();
            var order = _sessionManager.GetOrCreateCurrentOrder(storeId)
                .AsWritable(uow)
                .SetOrderStatus(Constants.OrderStatus.New)
                .InitializeTransaction(new SepaOrderFinalizeOrderNumberGenerator(orderNumber)) //Returning needed ordernumber to initialize transaction
                .Finalize(transactionAmount, "", PaymentStatus.PendingExternalSystem);
    
            _orderService.SaveOrder(order);
    
            uow.Complete();
    

    This resulted in a finalized but empty order, but maybe we shouldn't ask the order from SessionManger as I am not quit sure if the order remains in the session after doing to Mollie request and callback to the shop.

    The second option, removing the cache did the thing.

         var orderCache = _cache.EntityCaches.GetOrCreate<Order>();
         var orderReadOnlyCache = _cache.EntityCaches.GetOrCreate<OrderReadOnly>();
         var orderStateCache = _cache.EntityCaches.GetOrCreate<OrderState>();
    
         orderCache.Clear();
         orderReadOnlyCache.Clear();
         orderStateCache.Clear();
    

    Thanks and have fun at codegarden 👍

Please Sign in or register to post replies

Write your reply to:

Draft