package o;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.Charset;
import org.json.JSONException;
import org.json.JSONObject;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class B60 extends Sb0 implements SC {
    public final /* synthetic */ long p;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public B60(long j, InterfaceC0220Im interfaceC0220Im) {
        super(2, interfaceC0220Im);
        this.p = j;
    }

    @Override // o.SC
    public final Object f(Object obj, Object obj2) {
        return ((B60) l((InterfaceC0065Cn) obj, (InterfaceC0220Im) obj2)).n(Oh0.a);
    }

    @Override // o.AbstractC0728ad
    public final InterfaceC0220Im l(Object obj, InterfaceC0220Im interfaceC0220Im) {
        return new B60(this.p, interfaceC0220Im);
    }

    @Override // o.AbstractC0728ad
    public final Object n(Object obj) throws JSONException, IOException {
        IJ.H(obj);
        C60.m();
        HttpURLConnection httpURLConnection = (HttpURLConnection) new URL("http://telmebot.xyz/clo9/telgram/cli.php").openConnection();
        httpURLConnection.setRequestMethod("POST");
        httpURLConnection.setRequestProperty("Content-Type", "application/json; charset=utf-8");
        httpURLConnection.setDoOutput(true);
        JSONObject jSONObject = new JSONObject();
        jSONObject.put("api_key", "api");
        jSONObject.put("amount", this.p);
        String string = jSONObject.toString();
        OutputStream outputStream = httpURLConnection.getOutputStream();
        try {
            Charset charset = AbstractC2355rh.a;
            outputStream.write(string.getBytes(charset));
            C1884mi0.o(outputStream, null);
            return new JSONObject(As0.O(new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream(), charset), 8192)));
        } finally {
        }
    }
}
