From dbcffd2a3f53e7bb7e9f10daa2eed3618800e043 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'] git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17827 b9a71923-0436-4b27-9f14-aed3839534dd --- 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'); }