id; $operation = new BuysterOperation($cartId); if (isset($typePayment) && $typePayment == 'multiple') $operation->setOperation('paymentN'); else $operation->setOperation(Configuration::get('BUYSTER_PAYMENT_TRANSACTION_TYPE')); $buyster_token = substr(md5(rand()), 0, 6); $ref = "BuysterRef".date('Ymdhis').$buyster_token.$cart->id; // be carefull the reference must be under this request : [BuysterRef][YYYYMMDDhhmmss][token][cartId] $operation->setReference($ref); $operation->setToken($buyster_token); //call webservice buyster $webService = new BuysterWebService(); $url = $webService->getUrl($cart->getOrderTotal(), $_SERVER["REMOTE_ADDR"], $cart->id, $ref, $operation->getOperation(), $cart->id_customer); //amount, address ip, orderid, transactionRef , type , customerId if ($url['responseCode'] == '00' && isset($url['redirectionURL']) && $url['redirectionURL'] != '') { header("location:".$url['redirectionURL']); echo '

Si vous n\'êtes pas redirigés dans un petit instant, Veuillez cliquer ici

'; } else echo 'Problem : '.(isset($url['responseDescription']) ? $url['responseDescription'] : ''); include(dirname(__FILE__).'/../../footer.php'); ?>