$privateSecretPayPlug, 'apiVersion' => '2019-08-06', )); // --------------------------------------------------- // Flag edt : ajouter le code language dans la table pour pouvoir boucler dessus // --------------------------------------------------- if ($lg=="ENG") {$language="en";} else {$language="fr";} $return_url= $_SESSION['server']. '/recap-paiement-faireMajRecap-1'; // --------------------------------------------------- // Classe paiement // --------------------------------------------------- $payment = \Payplug\Payment::create(array( 'amount' => $amount, 'currency' => 'EUR', 'billing' => array( 'title' => $civFacLib, 'first_name' => $nom, 'last_name' => $prenom, 'email' => $idMail, 'address1' => $adresse, 'postcode' => $codePost, 'city' => $ville, 'country' => $codeIsoPaysFac, 'language' => $language ), 'shipping' => array( 'title' => $civLivLib, 'first_name' => $nomLiv, 'last_name' => $prenomLiv, 'email' => $idMail, 'address1' => $adrLiv. ' ' .$adrLiv2, 'postcode' => $codePostLiv, 'city' => $villeLiv, 'country' => $codeIsoPaysLib, 'language' => $language, 'delivery_type' => 'BILLING' ), 'hosted_payment' => array( 'return_url' => $return_url, 'cancel_url' => $_SESSION['server']. '/recap-paiement-faireMajRecap-0' ), 'notification_url' => $_SESSION['server']. '/recap-panier', 'metadata' => array( 'customer_id' => $customer_id ) )); $payment_url = $payment->hosted_payment->payment_url; $payment_id = $payment->id; if (isset($debug[1]) && $debug[1] == '1' ) echo $payment_url; ?>