Steps to replicate
- Install D9, webform, webform_civicrm, mjwshared and authnet.
- Create any form that can accept a contribution (set in test mode).
- Submit a card with an expiration date in the past.
- Card is declined, contribution isn't recorded, user receives an on-screen error.
- Card is declined, contribution is recorded as "Complete" in CiviCRM, user receives a message that their transaction is complete.
I traced this down to the "@fixme - Throw an exception" in the
handleError() method. I made what I believe are the necessary changes in authnet, mjwshared, and stripe. I can confirm that this fixes my scenario, but I wanted to get feedback on whether I was missing something obvious, because it seems like the sort of thing that you would've done if it was straightforward.