code: protected function hasDifferentCurrencies(PaymentSubjectInterface $subject)
      {
          $currency = $subject->getCurrency()->getCode();
  
          foreach ($subject->getPayments() as $payment) {
              if ($payment->getCurrency()->getCode() !== $currency) {
                  return true;
              }
          }
  
          return false;
      }
docs: Returns whether the subject has payment with different currency than its.
  
  @param PaymentSubjectInterface $subject
  
  @return bool