secure_key fix
This commit is contained in:
@@ -468,11 +468,15 @@ class Hutko extends PaymentModule
|
||||
* @return bool True if the order validation was successful, false otherwise.
|
||||
* @see PaymentModule::validateOrder()
|
||||
*/
|
||||
public function validateOrderFromCart(int $id_cart, float $amount, string $transaction_id = '', int $idState = 0): bool
|
||||
public function validateOrderFromCart(int $id_cart, float $amount, string $transaction_id = '', int $idState = 0, bool $fromCallBack = false): bool
|
||||
{
|
||||
if (!$idState) {
|
||||
$idState = (int) Configuration::get('PS_OS_PREPARATION');
|
||||
}
|
||||
if (!$fromCallBack) {
|
||||
$cart = new Cart($id_cart);
|
||||
$this->context->customer = new Customer($cart->id_customer);
|
||||
}
|
||||
// Call the parent validateOrder method with the "preparation" status.
|
||||
return $this->validateOrder($id_cart, $idState, $amount, $this->displayName, null, ['transaction_id' => $transaction_id], null, false, $this->context->customer->secure_key);
|
||||
}
|
||||
@@ -828,7 +832,6 @@ class Hutko extends PaymentModule
|
||||
if ($response['response']['response_status'] === 'success') {
|
||||
$result->success = true;
|
||||
$result->description = $this->trans('Refund success.', [], 'Modules.Hutko.Admin');
|
||||
|
||||
}
|
||||
|
||||
$order = new Order($orderId);
|
||||
|
||||
Reference in New Issue
Block a user