code: protected function getAcceptedStates(PaymentInterface $payment)
      {
          $acceptedStates = PaymentStates::getPaidStates();
  
          if ($payment->getMethod()->isOutstanding()) {
              $acceptedStates[] = PaymentStates::STATE_EXPIRED;
          }
  
          return $acceptedStates;
      }
docs: Returns the payment accepted states.
  
  @param PaymentInterface $payment
  
  @return array