public async Task <KlarnaCreateCheckoutOrderResponse> GetKlarnaCheckoutOrderAsync(string orderId) { var res = await _client.GetCheckoutOrderAsync(orderId); KlarnaCreateCheckoutOrderResponse response = new KlarnaCreateCheckoutOrderResponse { KlarnaOrderId = res.KlarnaOrderId, VeritixOrderId = res.VeritixOrderId, HtmlSnippet = res.HtmlSnippet, ErrorMessage = res.ErrorMessage, KlarnaOrderStatus = res.IsSuccess ? "Retrieved" : "Failed" }; return(response); }
public async Task <KlarnaCreateCheckoutOrderResponse> CreateKlarnaCheckoutOrderAsync(KlarnaCreateCheckoutOrderRequest request) { var res = await _client.CreateCheckoutOrderAsync(MakeCheckoutOrderRequest(request)); KlarnaCreateCheckoutOrderResponse response = new KlarnaCreateCheckoutOrderResponse { KlarnaOrderId = res.KlarnaOrderId, VeritixOrderId = res.VeritixOrderId, HtmlSnippet = res.HtmlSnippet, ErrorMessage = res.ErrorMessage, KlarnaOrderStatus = res.IsSuccess ? "Created" : "Failed" }; return(response); }