code: public function processPayment($payment)
      {
          if (is_array($payment)) {
              $payment = RequestCreator::create(ProcessPaymentRequest::class, $payment);
          }
  
          ObjectRecursiveValidator::validate($payment);
          $paymentSerializer = new ProcessPaymentSerializer($payment);
          $paymentTransport = new ProcessPaymentTransport($paymentSerializer);
  
          return $this->execute($paymentTransport, ProcessPaymentResponse::class);
      }
docs: @param ProcessPaymentRequest|AbstractRequest|array $payment
  
  @return ProcessPaymentResponse|AbstractResponse
  
  @throws TransportException
  @throws JsonParseException
  @throws ResponseException
  @throws ResponseParseException
  @throws RequestParseException