src/Client.php
public function createPayment($payment)
    {
        if (is_array($payment)) {
            $payment = RequestCreator::create(CreatePaymentRequest::class, $payment);
        }

        ObjectRecursiveValidator::validate($payment);
        $paymentSerializer = new CreatePaymentSerializer($payment);
        $paymentTransport = new CreatePaymentTransport($paymentSerializer);

        return $this->execute($paymentTransport, CreatePaymentResponse::class);
    }
public function createPayment($payment)
    {
        if (is_array($payment)) {
            $payment = RequestCreator::create(CreatePaymentRequest::class, $payment);
        }

        ObjectRecursiveValidator::validate($payment);
        $paymentSerializer = new CreatePaymentSerializer($payment);
        $paymentTransport = new CreatePaymentTransport($paymentSerializer);

        return $this->execute($paymentTransport, CreatePaymentResponse::class);
    }
public function createPayment ( $ payment ) { if ( is_array ( $ payment ) ) { $ payment = RequestCreator :: create ( CreatePaymentRequest :: class , $ payment ) ; } ObjectRecursiveValidator :: validate ( $ payment ) ; $ paymentSerializer = new CreatePaymentSerializer ( $ payment ) ; $ paymentTransport = new CreatePaymentTransport ( $ paymentSerializer ) ; return $ this -> execute ( $ paymentTransport , CreatePaymentResponse :: class ) ; }
@param CreatePaymentRequest|AbstractRequest|array $payment

@return CreatePaymentResponse|AbstractResponse

@throws TransportException
@throws JsonParseException
@throws ResponseException
@throws ResponseParseException
@throws RequestParseException
@param CreatePaymentRequest|AbstractRequest|array $payment