code: protected function setState(PaymentSubjectInterface $subject, $state)
      {
          if ($state !== $subject->getPaymentState()) {
              $subject->setPaymentState($state);
  
              return true;
          }
  
          return false;
      }
docs: Sets the payment state.
  
  @param PaymentSubjectInterface $subject
  @param string                  $state
  
  @return bool Whether the shipment state has been updated.