Merge pull request #13298 from jtraulle/patch-3

Fix Call to a member function getMessage() on null
This commit is contained in:
Laurent Destailleur 2020-03-07 17:40:33 +01:00 committed by GitHub
commit c4a429fb56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -665,9 +665,9 @@ if ($action == 'charge' && !empty($conf->stripe->enabled))
if ($paymentintent->status != 'succeeded')
{
$error++;
$errormessage = "StatusOfRetreivedIntent is not succeeded: ".$e->getMessage();
$errormessage = "StatusOfRetreivedIntent is not succeeded: ".$paymentintent->status;
dol_syslog($errormessage, LOG_WARNING, 0, '_stripe');
setEventMessages($e->getMessage(), null, 'errors');
setEventMessages($paymentintent->status, null, 'errors');
$action = '';
}
else