Merge branch 'ticket-payboxAgreement' into develop

This commit is contained in:
Marion Muszynski 2016-07-18 12:12:50 +02:00
commit 4fd07ebcd3
2 changed files with 10 additions and 5 deletions

View File

@ -269,10 +269,18 @@ class Paybox extends PaymentModule
* Save Information de Paiement Paybox (retour de la banque)
* @param array $values Tableau de retour Paybox
**/
public function saveInformationPaiement($values) {
public function saveInformationPaiement($values,$id_customer=null,$direct_plus=false) {
mail('marion@antadis.com', 'Transaction value', http_build_query($values,'',', ')); // dev
if(isset($values['u'])
|| !empty($values['u'])
&& $id_customer!=null
&& !$direct_plus
) {
$this->saveInformationCB($values,$id_customer);
}
$sql_cart = 'SELECT `num_transaction`
FROM `ps_paybox_transaction`
WHERE `id_cart` = ' .(int)$values["r"];

View File

@ -89,10 +89,7 @@ if (!$cart->id)
if ($id_order = (int)Order::getOrderByCartId($cart->id))
{
$paybox->saveInformationPaiement($values);
if (isset($values['u'])) {
$paybox->saveInformationCB($values,$cart->id_customer);
}
$paybox->saveInformationPaiement($values,$cart->id_customer);
if (empty($error))
{