Add online payment link

This commit is contained in:
ptibogxiv 2018-09-05 17:36:28 +02:00 committed by GitHub
parent 0bd4bc39dd
commit 639f24a95b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -790,6 +790,16 @@ if (! empty($id) && $action != 'edit')
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('don'));
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
// Show online payment link
$useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled));
if ($useonlinepayment) //$object->statut != Facture::STATUS_DRAFT &&
{
print '<br><!-- Link to pay -->'."\n";
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
print showOnlinePaymentUrl('donation', $object->ref).'<br>';
}
print '</div><div class="fichehalfright"><div class="ficheaddleft">';