Credit card transactions have grown considerably in the last few years. However, this increase has led to significant financial losses around the world. More than that, processing the enormous amount of generated data becomes very challenging, making the datasets highly dimensional and unbalanced. This means the collected data is suffering from two major problems. It is characterized by a severe difference in observation frequency between fraud and non-fraud transactions, and it contains irrelevant, inappropriate, and correlated data that negatively affects their prediction performance. Consequently, it has attracted the interest of machine learning (ML), which has become a significant actor in fraud detection. ML has provided methods such as Logistic Regression (LR), Support vector machines (SVM), Decision Trees (DT), Random Forest (RF), and K-Nearest Neighbors (KNN). However, these methods cannot meet the outstanding performance required to detect and predict unusual fraud patterns. In this regard, the contribution of this paper is to propose a framework for fraud detection (FFD). At first, to overcome the unbalanced data problem, the framework uses an undersampling technique. Next, a feature selection (FS) mechanism is applied to select only relevant features. Then, a Support Vector Data Description (SVDD) is used to build the ML model. SVDD aims to create a tight boundary around regular data points to distinguish them from potential outliers or anomalies. In order to enhance optimization capability for its hyperparameters C and σ, a modified version of the Particle Swarm Optimization (PSO) algorithm, Polynomial Self Learning PSO (PSLPSO), is proposed. As a result, the framework's effectiveness is shown in the experimental results on a real credit card transaction dataset.