Qual: Mutualize link to paypal
This commit is contained in:
parent
2803c1cbfd
commit
70ab87c210
@ -713,10 +713,17 @@ if ($rowid)
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
// Link for paypal payment
|
||||
if ($conf->paypal->enabled)
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php');
|
||||
print showPaypalPaymentUrl('membersubscription',$adh->ref);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Add new subscription form
|
||||
*/
|
||||
|
||||
@ -2938,15 +2938,8 @@ else
|
||||
// Link for paypal payment
|
||||
if ($conf->paypal->enabled)
|
||||
{
|
||||
$langs->load("paypal");
|
||||
$langs->load("paybox");
|
||||
$servicename='PayPal';
|
||||
include_once(DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php');
|
||||
|
||||
print '<br>';
|
||||
print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
||||
$url=getPaypalPaymentUrl(0,'invoice',$object->ref);
|
||||
print '<input type="text" id="paypalurl" value="'.$url.'" size="60"><br>';
|
||||
print showPaypalPaymentUrl('invoice',$object->ref);
|
||||
}
|
||||
|
||||
print '</td><td valign="top" width="50%">';
|
||||
|
||||
@ -165,6 +165,29 @@ function paypaladmin_prepare_head()
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return string with full Url
|
||||
*
|
||||
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...)
|
||||
* @param string $ref Ref of object
|
||||
* @return string Url string
|
||||
*/
|
||||
function showPaypalPaymentUrl($type,$ref)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("paypal");
|
||||
$langs->load("paybox");
|
||||
$servicename='PayPal';
|
||||
$out='<br><br>';
|
||||
$out.=img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
||||
$url=getPaypalPaymentUrl(0,$type,$ref);
|
||||
$out.='<input type="text" id="paypalurl" value="'.$url.'" size="60"><br>';
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return string with full Url
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user