Skip to content

Commit

Permalink
Merge pull request #10 from slupostrupek/customer_issue
Browse files Browse the repository at this point in the history
FO: double customer object declaration
  • Loading branch information
Progi1984 authored Jun 2, 2020
2 parents 2ef6fcb + e18f09e commit b979999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/front/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public function postProcess()
if (!$authorized) {
die(Tools::displayError('This payment method is not available.'));
}
$customer = new Customer($this->context->cart->id_customer);
$customer = new Customer((int)$this->context->cart->id_customer);
if (!Validate::isLoadedObject($customer)) {
Tools::redirectLink(__PS_BASE_URI__.'order.php?step=1');
}
$customer = new Customer((int)$this->context->cart->id_customer);

$total = $this->context->cart->getOrderTotal(true, Cart::BOTH);
$this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key);
Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->module->id.'&id_order='.(int)$this->module->currentOrder);
Expand Down

0 comments on commit b979999

Please sign in to comment.