From 9f2480712bd7dd0d7ba4ee5decd3293bc62d1066 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Tue, 29 Mar 2022 10:32:14 +0200 Subject: [PATCH] end of #20477 --- htdocs/commande/class/api_orders.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index b2fd8f830c6..0e14c99bb27 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -135,6 +135,11 @@ class Orders extends DolibarrApi // Add external contacts ids $this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', $contact_list); $this->commande->fetchObjectLinked(); + + // Add online_payment_url, cf #20477 + require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; + $this->commande->online_payment_url = getOnlinePaymentUrl(0, 'order', $this->commande->ref); + return $this->_cleanObjectDatas($this->commande); }