From 9388d82138b3d9eb3c49c8a90c56034a15d300eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Mon, 4 Sep 2023 18:28:47 +0200 Subject: [PATCH] Loan ID must be Fullfilment ID, not value(s) --- src/loan_token.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/loan_token.cpp b/src/loan_token.cpp index 8977ef2..14b50eb 100644 --- a/src/loan_token.cpp +++ b/src/loan_token.cpp @@ -29,24 +29,13 @@ namespace gourou if (!node) EXCEPTION(FFI_INVALID_LOAN_TOKEN, "No loanToken element in document"); - node = doc.select_node("/envelope/loanToken/loan").node(); + node = doc.select_node("/envelope/fulfillmentResult/fulfillment").node(); if (node) properties["id"] = node.first_child().value(); else { - node = doc.select_node("/envelope/fulfillmentResult/resourceItemInfo/licenseToken/permissions/display/loan").node(); - - if (node) - properties["id"] = node.first_child().value(); - else - { - node = doc.select_node("/envelope/fulfillmentResult/resourceItemInfo/licenseToken/permissions/play/loan").node(); - if (node) - properties["id"] = node.first_child().value(); - else - EXCEPTION(FFI_INVALID_LOAN_TOKEN, "No loanToken/loan element in document"); - } + EXCEPTION(FFI_INVALID_LOAN_TOKEN, "No fulfillment element in document"); } node = doc.select_node("/envelope/loanToken/operatorURL").node();