From: Jaswinder Singh Date: Mon, 17 Sep 2018 17:26:52 +0000 (-0400) Subject: LP#1772680: Changed the code to accommodate new Registration Response Structure X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=606af32a5dff949bcd09c3b356c282f71348f79e;p=evergreen%2Fpines.git LP#1772680: Changed the code to accommodate new Registration Response Structure Signed-off-by: Jaswinder Singh Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/EbookAPI/RBDigital.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/EbookAPI/RBDigital.pm index ac960027fe..e56a6739d6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/EbookAPI/RBDigital.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/EbookAPI/RBDigital.pm @@ -420,12 +420,12 @@ sub register_patron { $logger->info("EbookAPI: Calling an API to registering Patron: $username"); my $res = $self->request($req, $session_id); - if (defined ($res)) { - if ($res->{content}->{patronId}) { + if (defined($res)) { + if ($res->{content}->{patron}->{patronId}) { $logger->info("EbookAPI: User $username successfully registered with RBDigital portal."); - return $res->{content}->{patronId}; + return $res->{content}->{patron}->{patronId}; } else { - $logger->error("EbookAPI: Registration for $username to RBDigital failed: ".$res->{content}->{message}); + $logger->error("EbookAPI: Registration for $username to RBDigital failed: " . Dumper($res)); } }