fix: payment ok should trigger PAYMENTONLINE_PAYMENT_OK even on custom object

This commit is contained in:
Florian HENRY 2021-07-02 10:53:51 +02:00
parent 9392624e54
commit 783257706c

View File

@ -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")."<br>\n";