diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index 69caf4eeb5f..d5c3fe12fec 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -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
*/
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index c8c6f759114..17cce88c4bf 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -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 '
';
- print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'
';
- $url=getPaypalPaymentUrl(0,'invoice',$object->ref);
- print '
';
+ print showPaypalPaymentUrl('invoice',$object->ref);
}
print '