diff --git a/modules/paybox/direct_paiement.php b/modules/paybox/direct_paiement.php index 54b78178..3888929c 100644 --- a/modules/paybox/direct_paiement.php +++ b/modules/paybox/direct_paiement.php @@ -11,6 +11,22 @@ $controller->preProcess(); if (!$cookie->isLogged()) Tools::redirect('authentication.php'); +// verif if there's one order already then redirect to the order detail +if ($id_order = (int)Order::getOrderByCartId($cart->id)) +{ + // log + $content = ''; + if (file_exists('logs.txt')) { + $content = file_get_contents('logs.txt'); + } + $line = 'SECONDE TENTATIVE ['.(int)$cart->id.'] '.date('Y-m-d H:i:s').': Redirect id_order='.$id_order."\n"; + $content .= $line; + file_put_contents('logs.txt', $content); + // end log + + Tools::redirect('order-detail.php?id_order='.$id_order); +} + // verif if there's at least one order with this delivery address $orders_with_delivery_address = Db::getInstance()->getValue(' SELECT COUNT(`id_order`) @@ -161,11 +177,6 @@ foreach ($data as $d) { $pays = $d[1]; } } -// $num_trans = explode('NUMTRANS=', $data[0]); -// $num_appel = explode('NUMAPPEL=', $data[1]); -// $autorisation = explode('AUTORISATION=', $data[5]); -// $code_reponse = explode('CODEREPONSE=', $data[6]); -// $commentaire = explode('COMMENTAIRE=', $data[7]); $data[7] = utf8_encode($data[7]); @@ -208,7 +219,15 @@ if ($autorisation == 'XXXXXX' && $test_mode === 1) { if ($id_order = (int)Order::getOrderByCartId($cart->id)) { - $paybox->saveInformationPaiement($values); + // log + $content = ''; + if (file_exists('logs.txt')) { + $content = file_get_contents('logs.txt'); + } + $line = 'SECONDE RESPONSE ['.(int)$cart->id.']['.$num_question.'] '.date('Y-m-d H:i:s').': '.$response."\n"; + $content .= $line; + file_put_contents('logs.txt', $content); + // end log if (empty($error)) { diff --git a/themes/site/order-confirmation.tpl b/themes/site/order-confirmation.tpl index e24a3582..6ad84d0f 100755 --- a/themes/site/order-confirmation.tpl +++ b/themes/site/order-confirmation.tpl @@ -143,7 +143,7 @@ {l s='How make a return ?'} -
+ @@ -152,6 +176,7 @@ $(this).children('.input_radio').children('input[name="paiement-method"]').attr('checked', true); }); + // $('.submitPayment').live('click', function(e) { // e.preventDefault(); // // check if selected diff --git a/themes/site_mobile/order-confirmation.tpl b/themes/site_mobile/order-confirmation.tpl index fe76eb0d..c9b47c83 100755 --- a/themes/site_mobile/order-confirmation.tpl +++ b/themes/site_mobile/order-confirmation.tpl @@ -43,7 +43,7 @@{l s='You can download your invoice in your account, on'} "{l s='Order History'}"
- +{$product.product_name}
-{l s='Quantity'} {$product.product_quantity}
- {assign var='total' value=$product.product_price_wt * $product.product_quantity} +{l s='Quantity'} {$product.product_quantity}
+ {assign var='total' value=$product.product_price_wt * $product.product_quantity}{displayPrice price=$total}