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.
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.
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)
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();
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.
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.
Our client wants to support SEPA / manual payment transfers on orders as well.
Does this comment mean that the Vendr Mollie provider currently wouldn't support putting these orders on the status
Pending
out of the box?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?
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)
Hi Matt,
We tried both options, the first solution didn't really work out.
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.
Thanks and have fun at codegarden 👍
is working on a reply...