diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 60d763593fe..fb23e57d1ed 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -746,6 +746,12 @@ if ($ispaymentok) $result = $object->call_trigger('PAYMENTONLINE_PAYMENT_OK', $user); if ($result < 0) $error++; // End call triggers + } elseif (get_class($object)=='stdClass') { + //In some case $object is not instanciate (for paiement on custom object) We need to deal with payment + include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; + $paiement = new Paiement($db); + $result = $paiement->call_trigger('PAYMENTONLINE_PAYMENT_OK', $user); + if ($result < 0) $error++; } print $langs->trans("YourPaymentHasBeenRecorded")."
\n";