the codes are these here
@SimpleEvent(description = "Create a specific payment using your payment method id")
public void PREFERENCE_SPECIF(String URL, String response) {
EventDispatcher.dispatchEvent(this, "PREFERENCE_SPECIF", URL);
URL url = new URL("https://api.mercadopago.com/checkout/preferences");
HttpURLConnection http = (HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Authorization", "Bearer TEST-3310708299438226-092605-5ae9213774e815bb24c61d0a731d96ca-258257874");
http.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
String data = "{teste}";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
OutputStream stream = http.getOutputStream();
stream.write(out);
EventDispatcher.dispatchEvent(this,http.getResponseCode() + " " + http.getResponseMessage(),response);
http.disconnect();
}
somebody help me