package com.tencent.mm.plugin.appbrand.jsapi.l;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.jsapi.a;
import com.tencent.mm.plugin.appbrand.jsapi.l.a.3;
import com.tencent.mm.plugin.appbrand.s;
import com.tencent.mm.pluginsdk.wallet.g;
import com.tencent.mm.pluginsdk.wallet.h;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.ui.MMActivity;
import org.json.JSONObject;

public final class c extends a<s> {
    public static final int CTRL_INDEX = 86;
    public static final String NAME = "bindPaymentCard";

    public final /* synthetic */ void a(com.tencent.mm.plugin.appbrand.jsapi.c cVar, JSONObject jSONObject, int i) {
        AppMethodBeat.i(131412);
        s sVar = (s) cVar;
        if (jSONObject == null) {
            sVar.M(i, j("fail", null));
            AppMethodBeat.o(131412);
            return;
        }
        MMActivity mMActivity = (MMActivity) sVar.ad(MMActivity.class);
        if (mMActivity == null) {
            sVar.M(i, j("fail", null));
            AppMethodBeat.o(131412);
            return;
        }
        try {
            jSONObject.put("appId", sVar.getAppId());
            a aVar = a.hTJ;
            3 3 = new 3(aVar, new 1(this, sVar, i));
            g gVar = new g(jSONObject);
            gVar.cIg = 4;
            h.b(mMActivity, gVar, aVar.hashCode() & 65535, 3);
            AppMethodBeat.o(131412);
        } catch (Exception e) {
            ab.e("MicroMsg.JsApiBindPaymentCard", e.getMessage());
            sVar.M(i, j("fail", null));
            AppMethodBeat.o(131412);
        }
    }
}
