JsonException for expired orders
Closed this issue · 3 comments
I am currently using await client.PaymentAdmin.GetOrder(checkoutOrderId);
to retrieve order information, but occasionally I encounter a JsonException error. The JSON response contains the following data: "OrderStatus": "Expired"
However, the "Expired" value does not appear in the OrderStatus enum, I guess this might be causing the issue.
The error message I receive is:
JsonException: The JSON value could not be converted to Svea.WebPay.SDK.PaymentAdminApi.Response.OrderResponseObject. Path: $.OrderStatus | LineNumber: 0 | BytePositionInLine: 81.
Additionally, it would be great if the ExpirationDate mentioned in the documentation could be added as well 😄
@lounge Is there any estimate for the next release? It would be nice to be able to handle these cases without ugly workarounds :)
Published in 4.2.1 right now.