You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a bit confusing now that the cart is set to on hold. Especially that a purchase order (see below) is created with the name OnHold (copied from the cart during creation) instead of the default name. This means that you can't retrieve the order without defining the name (OnHold).
var list = _orderRepository.Load<IPurchaseOrder>(orderGroupId, "OnHold");
Validate Order
"Reason why we create an OnHold cart is to prevent that the customer can change/ see their cart after clicking the 'Place Order' button in the Klarna Checkout widget. The ICartService only loads the DEFAULT cart."
It's a bit confusing now that the cart is set to on hold. Especially that a purchase order (see below) is created with the name OnHold (copied from the cart during creation) instead of the default name. This means that you can't retrieve the order without defining the name (OnHold).
var list = _orderRepository.Load<IPurchaseOrder>(orderGroupId, "OnHold");
Validate Order
"Reason why we create an OnHold cart is to prevent that the customer can change/ see their cart after clicking the 'Place Order' button in the Klarna Checkout widget. The ICartService only loads the DEFAULT cart."
https://github.com/Geta/Klarna/blob/master/src/Klarna.Checkout/KlarnaCheckoutService.cs#L415
Demo project creating purchase order
https://github.com/Geta/Klarna/blob/master/demo/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Services/CheckoutService.cs#L243
Probably make this behavior clear in the documentation or create a method in the package that reset the cart name and create/ save an order.
cart.Name = "DEFAULT"; var orderReference = _orderRepository.SaveAsPurchaseOrder(cart);
The text was updated successfully, but these errors were encountered: