erge branch 'fix/secure_key' into develop

This commit is contained in:
Christophe LATOUR 2017-11-17 10:49:45 +01:00
commit b851050fed
2 changed files with 11 additions and 3 deletions

View File

@ -549,7 +549,7 @@ class PDFCore extends PDF_PageGroupCore
'company' => trim($mr_point['MR_Selected_LgAdr1']),
'vat_number' => '',
'address1' => trim($address_lines[0]),
'address2' => trim($address_lines[1]),
'address2' => isset($address_lines[1]) ? trim($address_lines[1]) : '',
'postcode' => trim($mr_point['MR_Selected_CP']),
'city' => trim($mr_point['MR_Selected_Ville']),
'Country:name' => trim($mr_point['MR_Selected_Pays']),

View File

@ -8,8 +8,16 @@
// Does order already exists ?
if (Validate::isLoadedObject($cart) AND $cart->OrderExists() == false)
{
if ($secure_key !== false AND $secure_key != $cart->secure_key)
die(Tools::displayError());
/* @Override
* do not die and create Order in error state
*/
// die(Tools::displayError());
if ($secure_key !== false AND $secure_key != $cart->secure_key) {
$id_order_state = Configuration::get('PS_OS_ERROR');
$message = "Problème de sercure_key. A valider manuellement" . "\n\n" . $message;
Logger::addLog('Invalid secure_key', 4, '0000001', 'Cart', intval($id_cart));
}
// Copying data from cart
$order = new Order();