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

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


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

import androidx.autofill.HintConstants;
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.PayMethod;
import com.free.vpn.proxy.hotspot.data.model.config.ProcessingEntity;
import com.free.vpn.proxy.hotspot.ex0;
import com.free.vpn.proxy.hotspot.jf2;
import com.free.vpn.proxy.hotspot.ne2;
import com.free.vpn.proxy.hotspot.t00;
import com.free.vpn.proxy.hotspot.to;
import com.free.vpn.proxy.hotspot.u80;
import com.free.vpn.proxy.hotspot.ui.billing.subscription.base.BaseSubscriptionFragment;
import com.free.vpn.proxy.hotspot.x74;
import com.free.vpn.proxy.hotspot.ye4;
import com.free.vpn.proxy.hotspot.zs4;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
import kotlin.Metadata;
import kotlin.TuplesKt;

@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0007\n\u0002\b\u0016\n\u0002\u0010$\n\u0002\b\u0011\b\u0007\u0018\u0000 22\u00020\u0001:\u00012B)\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0007\u0012\b\u0010\b\u001a\u0004\u0018\u00010\u0007¢\u0006\u0002\u0010\tJ\b\u00100\u001a\u00020\u0007H\u0002J\b\u00101\u001a\u00020\u0007H\u0002R\u0016\u0010\n\u001a\u00020\u000b8\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0016\u0010\u000e\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0016\u0010\u0011\u001a\u00020\u00078\u0006X\u0087D¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u0010R\u0013\u0010\u0006\u001a\u0004\u0018\u00010\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0010R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0015R\u0016\u0010\u0016\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0010R\u0016\u0010\u0018\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0019\u0010\u0010R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u001a\u0010\u001bR\u0016\u0010\u001c\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u001d\u0010\u0010R\u0013\u0010\b\u001a\u0004\u0018\u00010\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u001e\u0010\u0010R\u0016\u0010\u001f\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b \u0010\u0010R\u001d\u0010!\u001a\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u00070\"8F¢\u0006\u0006\u001a\u0004\b#\u0010$R\u0011\u0010%\u001a\u00020\u00078F¢\u0006\u0006\u001a\u0004\b&\u0010\u0010R\u0016\u0010'\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b(\u0010\u0010R\u001a\u0010)\u001a\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u00070\"X\u0082\u0004¢\u0006\u0002\n\u0000R\u0016\u0010*\u001a\u00020\u00078\u0006X\u0087D¢\u0006\b\n\u0000\u001a\u0004\b+\u0010\u0010R\u0016\u0010,\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b-\u0010\u0010R\u0016\u0010.\u001a\u00020\u00078\u0006X\u0087D¢\u0006\b\n\u0000\u001a\u0004\b/\u0010\u0010¨\u00063"}, d2 = {"Lcom/free/vpn/proxy/hotspot/data/model/billing/proxy/ProxyPayCreateRequest;", "", BaseSubscriptionFragment.KEY_ORDER, "Lcom/free/vpn/proxy/hotspot/data/model/billing/Order;", "entity", "Lcom/free/vpn/proxy/hotspot/data/model/config/ProcessingEntity;", "email", "", HintConstants.AUTOFILL_HINT_PHONE, "(Lcom/free/vpn/proxy/hotspot/data/model/billing/Order;Lcom/free/vpn/proxy/hotspot/data/model/config/ProcessingEntity;Ljava/lang/String;Ljava/lang/String;)V", "amount", "", "getAmount", "()F", "callbackParams", "getCallbackParams", "()Ljava/lang/String;", ProxyPayCreateRequest.K_DEVICE, "getDevice", "getEmail", "getEntity", "()Lcom/free/vpn/proxy/hotspot/data/model/config/ProcessingEntity;", AnalyticsKeysKt.KEY_MERCHANT_ID, "getMchid", "notifyUrl", "getNotifyUrl", "getOrder", "()Lcom/free/vpn/proxy/hotspot/data/model/billing/Order;", AnalyticsKeysKt.KEY_ORDER_ID, "getOrderRef", "getPhone", "prodName", "getProdName", "requestParams", "", "getRequestParams", "()Ljava/util/Map;", "requestUrl", "getRequestUrl", "returnUrl", "getReturnUrl", "signParams", "signType", "getSignType", ProxyPayCreateRequest.K_TYPE, "getType", "userIPAddress", "getUserIPAddress", "createCallbackParams", "generateSign", "Companion", "app_chinaSeoDirectBlackRelease"}, k = 1, mv = {1, 8, 0}, xi = ConstraintLayout.LayoutParams.Table.LAYOUT_CONSTRAINT_VERTICAL_CHAINSTYLE)
public final class ProxyPayCreateRequest {
    private static final String DEFAULT_CALLBACK_URL = "https://purchase.admindtech.com/ipn/proxy/";
    private static final String DEFAULT_IP = "127.0.0.1";
    private static final String DEFAULT_REQUEST_URL = "https://hypay.in/mapi.php";
    private static final String DEFAULT_SIGN_TYPE = "MD5";
    private static final String K_AMOUNT = "money";
    private static final String K_DEVICE = "device";
    private static final String K_IP = "clientip";
    private static final String K_MCHID = "pid";
    private static final String K_NAME = "name";
    private static final String K_NOTIFY_URL = "notify_url";
    private static final String K_ORDER_REF = "out_trade_no";
    private static final String K_PARAM = "param";
    private static final String K_RETURN_URL = "return_url";
    private static final String K_SIGN = "sign";
    private static final String K_SIGN_TYPE = "sign_type";
    private static final String K_TYPE = "type";
    private static final float MIN_AMOUNT = 5.0f;
    private static final String P_METHOD_ALIPAY = "alipay";
    private static final String P_METHOD_WECHAT = "wxpay";

    @SerializedName(K_AMOUNT)
    @Expose
    private final float amount;

    @SerializedName(K_PARAM)
    @Expose
    private final String callbackParams;

    @SerializedName(K_DEVICE)
    @Expose
    private final String device;
    private final String email;
    private final ProcessingEntity entity;

    @SerializedName(K_MCHID)
    @Expose
    private final String mchid;

    @SerializedName(K_NOTIFY_URL)
    @Expose
    private final String notifyUrl;
    private final Order order;

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

    @SerializedName("name")
    @Expose
    private final String prodName;

    @SerializedName(K_RETURN_URL)
    @Expose
    private final String returnUrl;
    private final Map<String, String> signParams;

    @SerializedName(K_SIGN_TYPE)
    @Expose
    private final String signType;

    @SerializedName(K_TYPE)
    @Expose
    private final String type;

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

    public ProxyPayCreateRequest(Order order, ProcessingEntity processingEntity, String str, String str2) {
        boolean z;
        String str3;
        boolean z2;
        zs4.o(order, BaseSubscriptionFragment.KEY_ORDER);
        zs4.o(processingEntity, "entity");
        this.order = order;
        this.entity = processingEntity;
        this.email = str;
        this.phone = str2;
        String key = processingEntity.getKey();
        this.mchid = key;
        PayMethod payMethod = processingEntity.getPayMethod();
        if (payMethod == PayMethod.Alipay) {
            z = true;
        } else {
            z = false;
        }
        if ((z ? payMethod : null) != null) {
            str3 = P_METHOD_ALIPAY;
        } else {
            str3 = P_METHOD_WECHAT;
        }
        this.type = str3;
        String orderRef = order.getOrderRef();
        this.orderRef = orderRef;
        String callbackUrl = processingEntity.getCallbackUrl();
        String str4 = DEFAULT_CALLBACK_URL;
        callbackUrl = callbackUrl == null ? DEFAULT_CALLBACK_URL : callbackUrl;
        this.notifyUrl = callbackUrl;
        String callbackUrl2 = processingEntity.getCallbackUrl();
        str4 = callbackUrl2 != null ? callbackUrl2 : str4;
        this.returnUrl = str4;
        String p = jf2.p(order.getProductName(), "_", order.getOrderRef());
        this.prodName = p;
        Float valueOf = Float.valueOf(order.getProcessingAmount());
        if (valueOf.floatValue() >= MIN_AMOUNT) {
            z2 = true;
        } else {
            z2 = false;
        }
        float m0 = to.m0(MIN_AMOUNT, z2 ? valueOf : null);
        this.amount = m0;
        this.userIPAddress = "127.0.0.1";
        this.device = "mobile";
        String createCallbackParams = createCallbackParams();
        this.callbackParams = createCallbackParams;
        this.signType = DEFAULT_SIGN_TYPE;
        this.signParams = ne2.d0(TuplesKt.to(K_MCHID, key), TuplesKt.to(K_TYPE, str3), TuplesKt.to(K_ORDER_REF, orderRef), TuplesKt.to(K_NOTIFY_URL, callbackUrl), TuplesKt.to(K_RETURN_URL, str4), TuplesKt.to("name", p), TuplesKt.to(K_AMOUNT, String.valueOf(m0)), TuplesKt.to(K_IP, "127.0.0.1"), TuplesKt.to(K_DEVICE, "mobile"), TuplesKt.to(K_PARAM, createCallbackParams), TuplesKt.to(K_SIGN_TYPE, DEFAULT_SIGN_TYPE));
    }

    private final String createCallbackParams() {
        StringBuilder sb;
        String E;
        StringBuilder sb2 = new StringBuilder();
        String str = this.email;
        if (str != null) {
            if (!(!x74.a1(str))) {
                str = null;
            }
            if (str != null) {
                sb = new StringBuilder("email:");
                sb.append(str);
                sb.append(":");
                sb2.append(sb.toString());
                sb2.append("period:" + this.order.getProductId() + ":");
                sb2.append("payMethod:wechat:platformoriginal:Android:");
                sb2.append("logic:" + this.order.getLogic());
                String sb3 = sb2.toString();
                zs4.n(sb3, "toString(...)");
                E = u80.E(0, sb3);
                if (E != null) {
                    return "";
                }
                return E;
            }
        }
        str = this.phone;
        if (str != null) {
            sb = new StringBuilder("phone:");
            sb.append(str);
            sb.append(":");
            sb2.append(sb.toString());
        }
        sb2.append("period:" + this.order.getProductId() + ":");
        sb2.append("payMethod:wechat:platformoriginal:Android:");
        sb2.append("logic:" + this.order.getLogic());
        String sb32 = sb2.toString();
        zs4.n(sb32, "toString(...)");
        E = u80.E(0, sb32);
        if (E != null) {
        }
    }

    private final String generateSign() {
        try {
            StringBuilder sb = new StringBuilder();
            Map<String, String> map = this.signParams;
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            for (Map.Entry<String, String> entry : map.entrySet()) {
                if (!x74.a1(entry.getValue())) {
                    linkedHashMap.put(entry.getKey(), entry.getValue());
                }
            }
            LinkedHashMap linkedHashMap2 = new LinkedHashMap();
            for (Map.Entry entry2 : linkedHashMap.entrySet()) {
                if (!zs4.h((String) entry2.getKey(), K_SIGN_TYPE)) {
                    linkedHashMap2.put(entry2.getKey(), entry2.getValue());
                }
            }
            for (Map.Entry entry3 : t00.A1(linkedHashMap2.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());
                }
            })) {
                sb.append(entry3.getKey() + "=" + entry3.getValue() + "&");
            }
            sb.deleteCharAt(sb.lastIndexOf("&"));
            sb.append(this.entity.getToken());
            String sb2 = sb.toString();
            zs4.n(sb2, "sb.toString()");
            String lowerCase = ex0.G(sb2).toLowerCase(Locale.ROOT);
            zs4.n(lowerCase, "toLowerCase(...)");
            return lowerCase;
        } catch (Exception e) {
            ye4.b(e);
            return "";
        }
    }

    public final float getAmount() {
        return this.amount;
    }

    public final String getCallbackParams() {
        return this.callbackParams;
    }

    public final String getDevice() {
        return this.device;
    }

    public final String getEmail() {
        return this.email;
    }

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

    public final String getMchid() {
        return this.mchid;
    }

    public final String getNotifyUrl() {
        return this.notifyUrl;
    }

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

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

    public final String getPhone() {
        return this.phone;
    }

    public final String getProdName() {
        return this.prodName;
    }

    public final Map<String, String> getRequestParams() {
        LinkedHashMap l0 = ne2.l0(this.signParams);
        l0.put("sign", generateSign());
        return new TreeMap(l0);
    }

    public final String getRequestUrl() {
        String createOrderUrl = this.entity.getCreateOrderUrl();
        return createOrderUrl == null ? DEFAULT_REQUEST_URL : createOrderUrl;
    }

    public final String getReturnUrl() {
        return this.returnUrl;
    }

    public final String getSignType() {
        return this.signType;
    }

    public final String getType() {
        return this.type;
    }

    public final String getUserIPAddress() {
        return this.userIPAddress;
    }
}