diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index f4163d61d3c..2a2a14a25d7 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -813,7 +813,7 @@ if ($source == 'order')
$amount=price2num($amount);
}
- $fulltag='ORD='.$order->ref.'.CUS='.$order->thirdparty->id;
+ $fulltag='ORD='.$order->id.'.CUS='.$order->thirdparty->id;
//$fulltag.='.NAM='.strtr($order->thirdparty->name,"-"," ");
if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; }
$fulltag=dol_string_unaccent($fulltag);
@@ -933,7 +933,7 @@ if ($source == 'invoice')
$amount=price2num($amount);
}
- $fulltag='INV='.$invoice->ref.'.CUS='.$invoice->thirdparty->id;
+ $fulltag='INV='.$invoice->id.'.CUS='.$invoice->thirdparty->id;
//$fulltag.='.NAM='.strtr($invoice->thirdparty->name,"-"," ");
if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; }
$fulltag=dol_string_unaccent($fulltag);
@@ -1115,7 +1115,7 @@ if ($source == 'contractline')
$amount=price2num($amount);
}
- $fulltag='COL='.$contractline->ref.'.CON='.$contract->ref.'.CUS='.$contract->thirdparty->id.'.DAT='.dol_print_date(dol_now(),'%Y%m%d%H%M');
+ $fulltag='COL='.$contractline->id.'.CON='.$contract->id.'.CUS='.$contract->thirdparty->id.'.DAT='.dol_print_date(dol_now(),'%Y%m%d%H%M');
//$fulltag.='.NAM='.strtr($contract->thirdparty->name,"-"," ");
if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; }
$fulltag=dol_string_unaccent($fulltag);
diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php
index 9f6ebaf99b6..9b844d8d8b9 100644
--- a/htdocs/public/payment/paymentok.php
+++ b/htdocs/public/payment/paymentok.php
@@ -313,7 +313,7 @@ if ($ispaymentok)
$adht = new AdherentType($db);
$object = new Adherent($db);
- $result1 = $object->fetch(0, $tmptag['MEM']);
+ $result1 = $object->fetch($tmptag['MEM']);
$result2 = $adht->fetch($object->typeid);
if ($result1 > 0 && $result2 > 0)
@@ -588,7 +588,7 @@ if ($ispaymentok)
// Record payment
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$invoice = new Facture($db);
- $result = $invoice->fetch(0, $tmptag['INV']);
+ $result = $invoice->fetch($tmptag['INV']);
if ($result)
{
$FinalPaymentAmt = $_SESSION["FinalPaymentAmt"];
@@ -776,9 +776,9 @@ if ($ispaymentok)
}
elseif (in_array('INV', array_keys($tmptag)))
{
- $url=$urlwithroot."/compta/facture/card.php?ref=".$tmptag['INV'];
+ $url=$urlwithroot."/compta/facture/card.php?id=".$tmptag['INV'];
$content.=''.$companylangs->trans("Payment")."
\n";
- $content.=$companylangs->trans("Invoice").': '.$tmptag['INV']."
\n";
+ $content.=$companylangs->trans("InvoiceId").': '.$tmptag['INV']."
\n";
//$content.=$companylangs->trans("ThirdPartyId").': '.$tmptag['CUS']."
\n";
$content.=$companylangs->trans("Link").': '.$url.''."
\n";
}