Fast Orange v3.5.3版本的 MD5 值为:33b91aba50c566533dfd683a85f79158

以下内容为反编译后的 RcPayCheckRequest.java 源代码,内容仅作参考


package com.free.vpn.proxy.hotspot.data.model.billing.rcpay;

import androidx.compose.runtime.internal.StabilityInferred;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.free.vpn.proxy.hotspot.an1;
import com.free.vpn.proxy.hotspot.data.model.analytics.AnalyticsKeysKt;
import com.free.vpn.proxy.hotspot.data.model.billing.Order;
import com.free.vpn.proxy.hotspot.data.model.config.ProcessingEntity;
import com.free.vpn.proxy.hotspot.ex0;
import com.free.vpn.proxy.hotspot.ne2;
import com.free.vpn.proxy.hotspot.t00;
import com.free.vpn.proxy.hotspot.ui.billing.subscription.base.BaseSubscriptionFragment;
import com.free.vpn.proxy.hotspot.zm2;
import com.free.vpn.proxy.hotspot.zs4;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import kotlin.Metadata;
import kotlin.TuplesKt;

@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\r\n\u0002\u0010%\n\u0002\b\u0003\n\u0002\u0010\t\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0007\u0018\u0000 \"2\u00020\u0001:\u0001\"B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\b\u0010\u001f\u001a\u00020\bH\u0002J\u0006\u0010 \u001a\u00020!R\u0016\u0010\u0007\u001a\u00020\b8\u0006X\u0087D¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0011\u0010\r\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\nR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0016\u0010\u0011\u001a\u00020\b8\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\nR\u0011\u0010\u0013\u001a\u00020\b8F¢\u0006\u0006\u001a\u0004\b\u0014\u0010\nR \u0010\u0015\u001a\u000e\u0012\u0004\u0012\u00020\b\u0012\u0004\u0012\u00020\b0\u00168BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u0017\u0010\u0018R\u0016\u0010\u0019\u001a\u00020\u001a8\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u001b\u0010\u001cR\u0016\u0010\u001d\u001a\u00020\b8\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u001e\u0010\n¨\u0006#"}, d2 = {"Lcom/free/vpn/proxy/hotspot/data/model/billing/rcpay/RcPayCheckRequest;", "", BaseSubscriptionFragment.KEY_ORDER, "Lcom/free/vpn/proxy/hotspot/data/model/billing/Order;", "entity", "Lcom/free/vpn/proxy/hotspot/data/model/config/ProcessingEntity;", "(Lcom/free/vpn/proxy/hotspot/data/model/billing/Order;Lcom/free/vpn/proxy/hotspot/data/model/config/ProcessingEntity;)V", "channelCode", "", "getChannelCode", "()Ljava/lang/String;", "getEntity", "()Lcom/free/vpn/proxy/hotspot/data/model/config/ProcessingEntity;", "logString", "getLogString", "getOrder", "()Lcom/free/vpn/proxy/hotspot/data/model/billing/Order;", AnalyticsKeysKt.KEY_ORDER_ID, "getOrderRef", "requestUrl", "getRequestUrl", "signParams", "", "getSignParams", "()Ljava/util/Map;", "timestamp", "", "getTimestamp", "()J", "username", "getUsername", "createSign", "requestBody", "Lcom/google/gson/JsonElement;", "Companion", "app_chinaSeoDirectBlackRelease"}, k = 1, mv = {1, 8, 0}, xi = ConstraintLayout.LayoutParams.Table.LAYOUT_CONSTRAINT_VERTICAL_CHAINSTYLE)
public final class RcPayCheckRequest {
    private static final String DEFAULT_CHECK_URL = "https://api.rcpays.com/api/v1/third-party/deposit-queries";
    private static final String K_CHANNEL_CODE = "channel_code";
    private static final String K_ORDER_REF = "order_number";
    private static final String K_SIGN = "sign";
    private static final String K_TS = "timestamp";
    private static final String K_USERNAME = "username";

    @SerializedName(K_CHANNEL_CODE)
    @Expose
    private final String channelCode;
    private final ProcessingEntity entity;
    private final String logString;
    private final Order order;

    @SerializedName(K_ORDER_REF)
    @Expose
    private final String orderRef;

    @SerializedName("timestamp")
    @Expose
    private final long timestamp;

    @SerializedName("username")
    @Expose
    private final String username;
    public static final int $stable = 8;

    public RcPayCheckRequest(Order order, ProcessingEntity processingEntity) {
        zs4.o(order, BaseSubscriptionFragment.KEY_ORDER);
        zs4.o(processingEntity, "entity");
        this.order = order;
        this.entity = processingEntity;
        this.channelCode = "USDT-TRC20";
        this.username = processingEntity.getKey();
        this.orderRef = order.getOrderRef();
        this.timestamp = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis());
        this.logString = ex0.F(this, true, false, 6);
    }

    private final String createSign() {
        StringBuilder sb = new StringBuilder();
        int i = 0;
        for (Object obj : t00.A1(getSignParams().entrySet(), new Comparator() {
            @Override
            public final int compare(T t, T t2) {
                return an1.i((String) ((Map.Entry) t).getKey(), (String) ((Map.Entry) t2).getKey());
            }
        })) {
            int i2 = i + 1;
            if (i < 0) {
                zm2.w0();
                throw null;
            }
            Map.Entry entry = (Map.Entry) obj;
            if (i != 0) {
                sb.append("&");
            }
            sb.append(entry.getKey() + "=" + entry.getValue());
            i = i2;
        }
        sb.append("&secret_key=" + this.entity.getToken());
        String sb2 = sb.toString();
        zs4.n(sb2, "toString(...)");
        String lowerCase = ex0.G(sb2).toLowerCase(Locale.ROOT);
        zs4.n(lowerCase, "toLowerCase(...)");
        return lowerCase;
    }

    private final Map<String, String> getSignParams() {
        return ne2.e0(TuplesKt.to(K_CHANNEL_CODE, this.channelCode), TuplesKt.to("username", this.username), TuplesKt.to(K_ORDER_REF, this.orderRef), TuplesKt.to("timestamp", String.valueOf(this.timestamp)));
    }

    public final String getChannelCode() {
        return this.channelCode;
    }

    public final ProcessingEntity getEntity() {
        return this.entity;
    }

    public final String getLogString() {
        return this.logString;
    }

    public final Order getOrder() {
        return this.order;
    }

    public final String getOrderRef() {
        return this.orderRef;
    }

    public final String getRequestUrl() {
        String checkOrderUrl = this.entity.getCheckOrderUrl();
        return checkOrderUrl == null ? DEFAULT_CHECK_URL : checkOrderUrl;
    }

    public final long getTimestamp() {
        return this.timestamp;
    }

    public final String getUsername() {
        return this.username;
    }

    public final JsonElement requestBody() {
        JsonObject jsonObject = new JsonObject();
        Iterator<T> it = getSignParams().entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry entry = (Map.Entry) it.next();
            jsonObject.addProperty((String) entry.getKey(), (String) entry.getValue());
        }
        jsonObject.addProperty("sign", createSign());
        return jsonObject;
    }
}