From 00d8200b28c89845a6775e7752b2e8e9eb273d70 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Wed, 10 Oct 2012 15:20:34 +0000 Subject: [PATCH] [+] CORE : added transaction_id in PaymentModule::validateOrder() in $extra_vars['transaction_id'] --- classes/PaymentModule.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index a0c8e9ef5..c501502f4 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -304,7 +304,12 @@ abstract class PaymentModuleCore extends Module // $order is the last order loop in the foreach // The method addOrderPayment of the class Order make a create a paymentOrder // linked to the order reference and not to the order id - if (!$order->addOrderPayment($amount_paid)) + if (isset($extra_vars['transaction_id'])) + $transaction_id = $extra_vars['transaction_id']; + else + $transaction_id = null; + + if (!$order->addOrderPayment($amount_paid, null, $transaction_id)) throw new PrestaShopException('Can\'t save Order Payment'); }