Toute transaction via l'API webservices d'e-venement répond aux mêmes contraintes que le reste de l'application : être authentifié (au minimum) et passer par un flux sécurisé (crypté, HTTP over SSL, si possible).

Voilà une première description de l'API pour e-venement ≥ 1.8 :

evt/api/create-transaction.cmd.php

créé une transaction

  /** 
    * Specifs...
    * GET params :
    * Returns :
    *   -  x : if > 0, the new transaction's number
    *   - -1 : user's rights problem
    *   - -2 : error in data treatment
    *
    **/

evt/api/tickets.cmd.php

créé des "demandes" (aucun engagement de part et d'autre)

 /** 
    * evt/api/tickets.cmd.php
    * GET params :
    *   - transac : transaction's number, as given by the software
    *   - manifid : current manifestation's id
    *   - tarif   : tarif's key
    *   - qte     : tickets' quantity (may be negative)
    * Returns :
    *   -   0 : ok, no problem, updating the DB has been going good
    *   -   1 : error in the DB updating, like connection problem, or query error
    *   -   2 : error, transac or manifid or tarif given were messed up
    *   - 253 : ok, updating the DB has been going good, but now all the queries added, the "jauge" should be overbooked
    *   - 254 : error in user's rights
    *   - 255 : misc error in data treatment
    *
    **/

evt/api/pay.cmd.php

ajoute des paiements pour une transaction

 /** 
    *
    * GET params :
    *   - transac : transaction's number, as given by the software
    *   - mode    : pay mode, id given by the software
    *   - amount  : how much... ;c)
    *   - date    : when will it be recorded
    *   - del     : (optional) if you want to delete this paiement
    * Returns :
    *   -   0 : ok, the paiement was recorded
    *   -   1 : error in the DB connection
    *   -   2 : error in the command calling... $_GET['transac'] not ok or others
    *   - 254 : user doesn't have the right
    *   - 255 : more than one record affected ???
    *
    **/

evt/api/bdc.php

créé virtuellement un bon de commande pour une transaction, permet ainsi de pré-réserver noter cette transaction comme "pré-réservée" (engamenent du vendeur).

  /** 
    * Specifs...
    * GET params :
    *   - transac : transaction's number, as given by the software
    *   - bdc     : if '0' : remove the pre-reservation "flag" ; if '1' : put the "pre-reservation" flag
    * Returns :
    *   -   0 : ok, no problem, updating the DB has been going good
    *   -   1 : error in the DB updating, like connection problem, or query error
    *   -   2 : error, transac given was messed up
    *   - 254 : error in user's rights
    *   - 255 : misc error in data treatment
    *
    **/

evt/api/transac-personne.cmd.php

pour relier une personne à une transaction... à condition d'en avoir l'identifiant (perso ou pro selon le type de lien).

 /** 
    * Specifs...
    * GET params :
    *   - client  : string like prof_940 where 940 is the personne_properso.fctorgid, for professional clients
    *               string like pers_2094 where 2094 is the personne_properso.id, for individual clients
    *   - transac : transaction's number, as given by the software
    * Returns :
    *   -   0 : ok, no problem, updating the DB has been going good
    *   -   1 : error in the DB updating, like connection problem, or query error
    *   -   2 : error, transac or client given were messed up
    *   - 254 : error, user's doesn't have rights
    *   - 255 : error, not just 1 record has been updated (0 or more than 1)
    *
    **/
Search