This should be `$payment->getId()` as we pay payments, not orders anymore, right?