Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.volley92.asso.fr
/
htdocs
/
functions
/
/srv/data/web/vhosts/www.volley92.asso.fr/htdocs/functions/paiement.php
<?php date_default_timezone_set('Europe/Paris'); if(!empty($_SESSION['prix'])){ $amount = $_SESSION['prix']*100; $price = $_SESSION['prix']; $description = $_SESSION['firstname'].' '.$_SESSION['lastname']; $email = $_SESSION['email']; }else{ header("Location: " . $routes['form-paiement']); } //Si le formulaire est rempli par un robot include "functions/Stripe/StripeService.php"; try{ $stripeSevice = new StripeService($sk_stripe); $base = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://{$_SERVER['HTTP_HOST']}"; $input = array( 'name' => $conf_name, 'description' => 'Paiement de '.$description, 'image' => $base.'/img/logo.png', 'amount' => $amount, 'success_url' => $base.'/'.$routes['success_url'], 'cancel_url' => $base.'/'.$routes['cancel_url'] ); $checkout = $stripeSevice->checkout($input); $_SESSION['stripeKey'] = $checkout->payment_intent; $_SESSION['session_id'] = $checkout->id; //echo '<pre>'; var_dump($_SESSION); echo '</pre>'; }catch (Exception $e) { $errorMessage = $e->getMessage(); echo "<br> <div class='container'> <div id='alert' class='alert alert-danger'><button type='button' class='close' data-dismiss='alert'>×</button>Erreur! ".$errorMessage." </div> </div>"; }