"Update the paymentIntent in the CiviCRM database for later tracking" code not working
In this line: https://lab.civicrm.org/extensions/stripe/-/blob/6cf65aea79459607239f4d854cf9a0d891021f37/CRM/Core/Payment/Stripe.php#L870
we rely on $intent
existing, but it doesn't! (it is defined a few lines earlier, but inside a different scope).
i.e. we have this pattern:
if (something) {
$intent = defineIntent();
}
else {
useVar($intent);
}