public function addChoice($name, $prix, $stock) { $choice = new Choice($this->id, $name, $prix, $stock); $choice->insert(); return $choice; }
$choice->payutc_art_idC = $ret->success; } // Création de l'article non cotisant dans payutc // $ret = $payutcClient->setProduct(array( // "name" => $desc->titre." ".$choice->name, // "parent" => $desc->payutc_cat_id, // "prix" => $choice->priceNC, // "stock" => $choice->stock, // "image" => '', // "alcool" => 0, // "cotisant" => False, // "fun_id" => $desc->payutc_fun_id)); // if(isset($ret->success)) { // $choice->payutc_art_idNC = $ret->success; // } $choice->insert(); } catch (\Exception $e) { $app->flashNow('info', "Une erreur est survenu, la création du choix à échoué. => {$e->getMessage()}"); $app->render('header.php', array()); $app->render('form.php', array("form" => $form)); $app->render('footer.php', array('isAdminFondation' => $isAdminFondation)); return; } } $app->redirect("adminshotgun?id=" . $id); }); // Admin panel, welcome page $app->get('/admin', function () use($app, $admin, $isAdminFondation) { $payutcClient = getPayutcClient("GESARTICLE"); try { $status = $payutcClient->getStatus();