enhance isPaymentOK hook (#35674)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Mohamed DAOUD 2025-10-07 20:47:55 +02:00 committed by GitHub
parent 41f5804a92
commit 7626de3ff1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -494,6 +494,8 @@ if (!in_array($paymentmethod, array('paypal', 'paybox', 'stripe'))) {
dol_syslog('ispaymentok overwrite by hook return with value='.$hookmanager->resArray['ispaymentok'], LOG_DEBUG, 0, '_payment');
$ispaymentok = $hookmanager->resArray['ispaymentok'];
}
} else {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
}
@ -2117,10 +2119,18 @@ if (empty($doactionsthenredirect)) {
}
} else {
print $langs->trans('DoExpressCheckoutPaymentAPICallFailed')."<br>\n";
print $langs->trans('DetailedErrorMessage').": ".$ErrorLongMsg."<br>\n";
print $langs->trans('ShortErrorMessage').": ".$ErrorShortMsg."<br>\n";
print $langs->trans('ErrorCode').": ".$ErrorCode."<br>\n";
print $langs->trans('ErrorSeverityCode').": ".$ErrorSeverityCode."<br>\n";
if ($ErrorLongMsg) {
print $langs->trans('DetailedErrorMessage').": ".$ErrorLongMsg."<br>\n";
}
if ($ErrorShortMsg) {
print $langs->trans('ShortErrorMessage').": ".$ErrorShortMsg."<br>\n";
}
if ($ErrorCode) {
print $langs->trans('ErrorCode').": ".$ErrorCode."<br>\n";
}
if ($ErrorSeverityCode) {
print $langs->trans('ErrorSeverityCode').": ".$ErrorSeverityCode."<br>\n";
}
if ($mysoc->email) {
print "\nPlease, send a screenshot of this page to ".$mysoc->email."<br>\n";