From 4a8be94190ee4406f1964c8052803c7ccb08f190 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 25 May 2011 06:58:05 +0000 Subject: [PATCH] Works on paypal module Fix: problem with db begin --- htdocs/paypal/ajaxtransaction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/paypal/ajaxtransaction.php b/htdocs/paypal/ajaxtransaction.php index 45ba83969e6..a8cc8fc93ff 100644 --- a/htdocs/paypal/ajaxtransaction.php +++ b/htdocs/paypal/ajaxtransaction.php @@ -69,6 +69,8 @@ if (isset($_GET['action']) && ! empty($_GET['action']) && isset($_GET['transacti $error=0; $return_arr = array(); + $db->begin(); + // Create customer if not exists $ret = $soc->fetchObjectFrom($soc->table_element,'ref_int',$_SESSION[$_GET['transaction_id']]['PAYERID']); if ($ret < 0) @@ -98,8 +100,6 @@ if (isset($_GET['action']) && ! empty($_GET['action']) && isset($_GET['transacti $soc->client = 1; $soc->particulier = 1; - $db->begin(); - $result = $soc->create($user); if ($result >= 0) {