Changeset 51439 in spip-zone
- Timestamp:
- Sep 15, 2011, 4:29:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/commandes_paypal/commandes_paypal_pipelines.php
r51312 r51439 38 38 $statut_nouveau = 'erreur'; 39 39 } 40 41 spip_log("envoi vers instituer $id_commande-$statut_nouveau",'commandes_paypal_traitement');42 40 43 //on institue la commande 44 $action = charger_fonction('instituer_commande', 'action/'); 45 $action('$id_commande-$statut_nouveau'); 46 41 // On change le statut de la commande 42 $changements = array( 43 'statut' => $statut_nouveau 44 ); 45 46 // Si le statut est "paye" alors on ajoute la date de paiement 47 if ($statut_nouveau == 'paye'){ 48 $changements['date_paiement'] = date('Y-m-d H:i:s'); 49 } 50 51 // On fait la mise à jour 52 $ok = sql_updateq( 53 'spip_commandes', 54 $changements, 55 'id_commande = '.$id_commande 56 ); 57 58 // Si c'est bon, on appelle une notification 59 if ($ok){ 60 $id_auteur = $commande['id_auteur']; 61 $fonction_notif = charger_fonction('notifications', 'inc/'); 62 $fonction_notif('commande_instituer', $id_commande, array('ancien_statut' => $statut_commande, 'nouveau_statut' => $statut_nouveau)); 63 } 47 64 } 48 65
Note: See TracChangeset
for help on using the changeset viewer.