src/SecucardConnect/Product/Smart/TransactionsService.php
public function prepare($transactionId, $type, $object = null)
    {
        if (!in_array(
            $type,
            [
                self::TYPE_AUTO,
                self::TYPE_DIRECT_DEBIT,
                self::TYPE_CREDIT_CARD,
                self::TYPE_INVOICE,
                self::TYPE_PAYPAL,
            ]
        )) {
            throw new \InvalidArgumentException('Wrong transaction type');
        }

        return $this->execute($transactionId, 'prepare', $type, $object, Transaction::class);
    }
public function prepare($transactionId, $type, $object = null)
    {
        if (!in_array(
            $type,
            [
                self::TYPE_AUTO,
                self::TYPE_DIRECT_DEBIT,
                self::TYPE_CREDIT_CARD,
                self::TYPE_INVOICE,
                self::TYPE_PAYPAL,
            ]
        )) {
            throw new \InvalidArgumentException('Wrong transaction type');
        }

        return $this->execute($transactionId, 'prepare', $type, $object, Transaction::class);
    }
public function prepare ( $ transactionId , $ type , $ object = null ) { if ( ! in_array ( $ type , [ self :: TYPE_AUTO , self :: TYPE_DIRECT_DEBIT , self :: TYPE_CREDIT_CARD , self :: TYPE_INVOICE , self :: TYPE_PAYPAL , ] ) ) { throw new \ InvalidArgumentException ( 'Wrong transaction type' ) ; } return $ this -> execute ( $ transactionId , 'prepare' , $ type , $ object , Transaction :: class ) ; }
Preparing a transaction.

@param string $transactionId The transaction id.
@param string $type The transaction type like "auto" or "cash".
@param null $object
@return Transaction The prepared transaction.
@throws GuzzleException
@throws ApiError
@throws AuthError
@throws ClientError
Preparing a transaction .