Fix Call to a member function getMessage() on null
Because we are not in the exception block, $e is necessarily undefined. Thus replacing $e->getMessage(); by value of $paymentintent->status.
This commit is contained in:
parent
d4b67a6cef
commit
f7dda657b1
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue