Issue #3609746: Classify a failed capture, release or refund as retryable or declined
Makes a gateway's resolve/reversal operations classify their failures so a caller can tell a retryable failure from a permanent one.
capture(),release()andrefund()now returnvoidand throw on failure:GatewayRetryableExceptionwhen the provider cannot act on the transaction yet (the WorldlineACTION_NOT_ALLOWED_ON_TRANSACTIONrace, which a later retry clears),GatewayDeclinedExceptionwhen it permanently refused.- The Worldline gateway classifies each failure by its structured error code; the payment manager propagates the exception instead of swallowing it, so the payment state advances only on success.
- The create operations (
authorize,chargeToken) keep their boolean return, since their outcome is recorded as the payment state. - Drive-by: corrects the payment manager's event-dispatcher type hint (PSR to the Symfony interface Drupal's dispatcher implements), fixing pre-existing phpstan errors.
Kernel tests cover the manager propagating a decline out of captureHold, releaseHold and refund, and the Worldline gateway mapping a transient error code to retryable and any other to declined.