Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

klarna_reference missing from CheckoutOrder #53

Closed
kwestground opened this issue Jun 27, 2019 · 2 comments
Closed

klarna_reference missing from CheckoutOrder #53

kwestground opened this issue Jun 27, 2019 · 2 comments

Comments

@kwestground
Copy link

CheckoutOrder does not map "klarna_response"

https://github.com/klarna/kco_rest_dotnet/blob/v3.x/Klarna.Rest/Klarna.Rest.Core/Model/CheckoutOrder.cs

https://developers.klarna.com/api/#order-management-api-get-order

@alexions
Copy link
Contributor

alexions commented Aug 8, 2019

Hi @kwestground

Thanks for the feedback.

You are right, the CheckoutOrder has no such field and actually it should not by two reasons:

  1. The Klarna Checkout service differs from the Klarna Order Management service. You can consider them as two separated services, so they can have a different Order models
  2. The most important part is, the field itself:

klarna_reference A Klarna generated reference that is shorter than the Klarna Order Id and is used as a customer friendly reference. It is most often used as a reference when Klarna is communicating with the customer with regard to payment statuses.

So this is a "friendly representation" of the created order. Since the checkout processes an order and it is not placed yet by customer, you cannot have such field (you can consider the order like "does not exist yet") and that's why the CheckoutOrder model has no such field. But after the order is placed - this reference will be generated and then you can use it.

Klarna Checkout says, that after placing an order use the Order Management to get the details. So using the Order Management you can finally get the klarna_reference.

By the way, thanks for pointing us to the models, we actualized them by adding missing fields (not related to the klarna_reference but still important).

Thanks!

alexions pushed a commit that referenced this issue Aug 8, 2019
Fix #53: Actualize the CheckoutOrder and OrderManagementOrder models.
@alexions
Copy link
Contributor

alexions commented Aug 9, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants