         }
 
         MercadoPagoSDKV4.request(request).responseData { response in
-            #if DEBUG
-            print("Request: \(String(describing: response.request))")
-            if let body = response.request?.httpBody {
-                print("Request Body: \(String(describing: String(data: body, encoding: .utf8)))")
-            }
-            print("Error: \(String(describing: response.error))")
-            #endif
+            MercadoPagoService.debugPrint(response: response)
 
-            if let data = response.result.value, let utf8Text = String(data: data, encoding: .utf8), response.error == nil {
-                print("Data: \(utf8Text)")
+            if let data = response.result.value, response.error == nil {
                 success(data)
             } else if let error = response.error as NSError? {
                 failure?(error)

            requesturl += "?" + escapedParams
        }

        let Rurl = URL(string: requesturl)
        var request = URLRequest(url: Rurl!)
        request.httpMethod = method.rawValue
        request.httpBody = body

        request.setValue("application/json", forHTTPHeaderField: "Content-Type")
        if let sdkVersion = PXServicesURLConfigs.PX_SDK_VERSION {

                failure?(error)
            }
        }
    }
}

extension MercadoPagoService {
    static func debugPrint(response: DataResponse<Data>?) {
        guard let response = response else {
            return
        }
        #if DEBUG
        print("--Request: \(String(describing: response.request))")
        if let body = response.request?.httpBody {
            print("--Request Body: \(String(describing: String(data: body, encoding: .utf8)))")
        }
        if let data = response.result.value, let utf8Text = String(data: data, encoding: .utf8) {
            print("--Data: \(utf8Text)")
        }
        print("--Error: \(String(describing: response.error))")
        #endif
    }
}
