Commit 207a98d565ded688879a4520fdbd0a7f3d48d044
1 parent
b7fdf7d0
id → idTransaction
Showing
4 changed files
with
8 additions
and
8 deletions
Show diff stats
api/client/ajouter.php
... | ... | @@ -32,9 +32,9 @@ if (!$requete->execute()) { |
32 | 32 | retour("erreur_bdd", ["message" => $requete->error]); |
33 | 33 | } |
34 | 34 | $requete->close(); |
35 | -$id = transaction(TRANSACTION_CREATION, $_POST["idCarte"], $solde); | |
35 | +$idTransaction = transaction(TRANSACTION_CREATION, $_POST["idCarte"], $solde); | |
36 | 36 | |
37 | 37 | |
38 | -retour("ok", ["id" => $id]); | |
38 | +retour("ok", ["idTransaction" => $idTransaction]); | |
39 | 39 | |
40 | 40 | ?> | ... | ... |
api/client/payer.php
... | ... | @@ -53,9 +53,9 @@ if (!$requete->execute()) { |
53 | 53 | retour("erreur_bdd", ["message" => $requete->error]); |
54 | 54 | } |
55 | 55 | $requete->close(); |
56 | -$id = transaction(TRANSACTION_PAIEMENT, $_POST["idCarte"], $montant, $quantite); | |
56 | +$idTransaction = transaction(TRANSACTION_PAIEMENT, $_POST["idCarte"], $montant, $quantite); | |
57 | 57 | |
58 | 58 | |
59 | -retour("ok", ["id" => $id, "soldeAncien" => $soldeAncien, "soldeNouveau" => $soldeNouveau]); | |
59 | +retour("ok", ["idTransaction" => $idTransaction, "soldeAncien" => $soldeAncien, "soldeNouveau" => $soldeNouveau]); | |
60 | 60 | |
61 | 61 | ?> | ... | ... |
api/client/recharger.php
... | ... | @@ -35,9 +35,9 @@ if (!$requete->execute()) { |
35 | 35 | retour("erreur_bdd", ["message" => $requete->error]); |
36 | 36 | } |
37 | 37 | $requete->close(); |
38 | -$id = transaction(TRANSACTION_RECHARGEMENT, $_POST["idCarte"], $montant); | |
38 | +$idTransaction = transaction(TRANSACTION_RECHARGEMENT, $_POST["idCarte"], $montant); | |
39 | 39 | |
40 | 40 | |
41 | -retour("ok", ["id" => $id, "soldeAncien" => $soldeAncien, "soldeNouveau" => $soldeNouveau]); | |
41 | +retour("ok", ["idTransaction" => $idTransaction, "soldeAncien" => $soldeAncien, "soldeNouveau" => $soldeNouveau]); | |
42 | 42 | |
43 | 43 | ?> | ... | ... |
api/client/vidange.php
... | ... | @@ -31,9 +31,9 @@ if (!$requete->execute()) { |
31 | 31 | retour("erreur_bdd", ["message" => $requete->error]); |
32 | 32 | } |
33 | 33 | $requete->close(); |
34 | -$id = transaction(TRANSACTION_VIDANGE, $_POST["idCarte"], $soldeAncien); | |
34 | +$idTransaction = transaction(TRANSACTION_VIDANGE, $_POST["idCarte"], $soldeAncien); | |
35 | 35 | |
36 | 36 | |
37 | -retour("ok", ["id" => $id, "soldeAncien" => $soldeAncien]); | |
37 | +retour("ok", ["idTransaction" => $idTransaction, "soldeAncien" => $soldeAncien]); | |
38 | 38 | |
39 | 39 | ?> | ... | ... |