Skip to content
Snippets Groups Projects
Commit c4c3298c authored by root's avatar root
Browse files

fix variables name

parent 094ad8b5
Branches fix/seda2_transferSource
No related tags found
No related merge requests found
......@@ -113,13 +113,13 @@ class MaarchREST extends SAEConnecteur {
* @throws Exception
*/
public function getAck(string $transfert_id, string $originating_agency_id): string {
if (!$id_transfert){
if (!$transfert_id){
throw new UnrecoverableException("L'identifiant du transfert n'a pas été trouvé");
}
$messageInformations = $this->getWS(
"/medona/message/reference?reference="
.urlencode($id_transfert."_Ack"),
.urlencode($transfert_id."_Ack"),
"application/json"
);
......@@ -142,18 +142,18 @@ class MaarchREST extends SAEConnecteur {
}
public function getAtr(string $transfert_id, string $originating_agency_id): string {
if (! $id_transfert){
if (! $transfert_id){
throw new UnrecoverableException("L'identifiant du transfert n'a pas été trouvé");
}
$messageInformations = $this->getWS(
"/medona/message/reference?reference="
.urlencode($id_transfert),
.urlencode($transfert_id),
"application/json"
);
if ($messageInformations['status'] != "processed") {
throw new UnrecoverableException("Le bordereau dont la référence est " . $id_transfert . " n'a pas encore été traité dans le SAE Maarch RM.");
throw new UnrecoverableException("Le bordereau dont la référence est " . $transfert_id . " n'a pas encore été traité dans le SAE Maarch RM.");
}
if ($messageInformations) {
......@@ -299,4 +299,4 @@ class MaarchREST extends SAEConnecteur {
return "L'organisation identifiée par $orgId n'a pas été trouvée dans le SAE. Veuillez vérifier le paramétrage du connecteur ou du SAE.";
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment