Some Adyen CAPTURE webhooks for Gravy-orchestrated transactions are arriving with a colon-separated merchantReference. e.g.:
"merchantReference":"61SCO9jPrV41AIP8Wl5xkm:4Fn2bJ6cThbEiEdI1zGkYi"
The colon is not in the Base62 alphabet, so the subsequent Base62Helper::toUuid( $notification['merchantReference'] ); fails
It looks like we don't need to perform this conversion anyway for these cases, as CaptureResponseAction::execute() drops these messages later on in this check:
public function execute( ListenerMessage $msg ): bool { $tl = new TaggedLogger( 'CaptureResponseAction' ); if ( $msg instanceof Capture ) { if ( $msg->success ) { // drop Gr4vy initiated message if ( $msg->gateway === 'gravy' ) { return true; } $tl->info( "Adding record capture job for {$msg->currency} {$msg->amount} with psp reference {$msg->pspReference}." ); $recordJob = RecordCaptureJob::factory( $msg ); QueueWrapper::push( 'jobs-adyen', $recordJob ); } else { $tl->warning( "Capture failed for payment with reference {$msg->pspReference}.", $msg ); } } return true; }
I'll add some code to detect and skip this conversion