导航菜单

页面标题

页面副标题

Clash Legends v0.0.1 - fg.java 源代码

正在查看: Clash Legends v0.0.1 应用的 fg.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.paypal.android.sdk;

import com.google.firebase.analytics.FirebaseAnalytics;
import com.onesignal.notifications.internal.common.NotificationFormatHelper;
import com.paypal.android.sdk.payments.PayPalPayment;
import com.payu.india.Payu.PayuConstants;
import com.payu.upisdk.util.UpiConstant;
import java.util.Locale;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;

public final class fg extends fq {
    private String a;
    private String b;
    private JSONArray c;
    private JSONObject d;
    private JSONArray e;
    private er f;
    private Map g;
    private fo[] h;
    private String i;
    private boolean j;
    private String k;
    private boolean l;
    private String m;
    private String n;
    private String o;
    private String p;

    public fg(cx cxVar, b bVar, String str, String str2, String str3, er erVar, Map map, fo[] foVarArr, String str4, boolean z, String str5, String str6, String str7, boolean z2) {
        super(df.CreateSfoPaymentRequest, cxVar, bVar, str);
        this.f = erVar;
        this.g = map;
        this.h = foVarArr;
        this.i = str4;
        this.l = z2;
        this.k = str7;
        if (d.a((CharSequence) str7)) {
            this.k = PayPalPayment.PAYMENT_INTENT_SALE;
        }
        this.k = this.k.toLowerCase(Locale.US);
        a("PayPal-Request-Id", str2);
        if (d.b((CharSequence) str5)) {
            a("PayPal-Partner-Attribution-Id", str5);
        }
        if (d.b((CharSequence) str6)) {
            a("PayPal-Client-Metadata-Id", str6);
        }
    }

    public final fg a(boolean z) {
        this.j = z;
        return this;
    }

    @Override
    public final String b() {
        JSONObject jSONObject;
        JSONObject jSONObject2 = new JSONObject();
        jSONObject2.accumulate(UpiConstant.UPI_INTENT_S, this.k);
        JSONObject jSONObject3 = new JSONObject();
        jSONObject3.accumulate("payment_method", "paypal");
        jSONObject2.accumulate("payer", jSONObject3);
        JSONObject jSONObject4 = new JSONObject();
        jSONObject4.accumulate("cancel_url", "http://cancelurl");
        jSONObject4.accumulate("return_url", "http://returnurl");
        jSONObject2.accumulate("redirect_urls", jSONObject4);
        er erVar = this.f;
        JSONObject jSONObject5 = new JSONObject();
        jSONObject5.accumulate("currency", erVar.b().getCurrencyCode());
        jSONObject5.accumulate("total", erVar.a().toPlainString());
        Map map = this.g;
        if (map != null && !map.isEmpty()) {
            Map map2 = this.g;
            if (map2 == null || map2.isEmpty()) {
                jSONObject = null;
            } else {
                jSONObject = new JSONObject();
                if (this.g.containsKey(FirebaseAnalytics.Param.SHIPPING)) {
                    jSONObject.accumulate(FirebaseAnalytics.Param.SHIPPING, this.g.get(FirebaseAnalytics.Param.SHIPPING));
                }
                if (this.g.containsKey("subtotal")) {
                    jSONObject.accumulate("subtotal", this.g.get("subtotal"));
                }
                if (this.g.containsKey(FirebaseAnalytics.Param.TAX)) {
                    jSONObject.accumulate(FirebaseAnalytics.Param.TAX, this.g.get(FirebaseAnalytics.Param.TAX));
                }
            }
            jSONObject5.accumulate(PayuConstants.DETAILS, jSONObject);
        }
        JSONObject jSONObject6 = new JSONObject();
        jSONObject6.accumulate("amount", jSONObject5);
        jSONObject6.accumulate(PayuConstants.DESCRIPTION, this.i);
        fo[] foVarArr = this.h;
        if (foVarArr != null && foVarArr.length > 0) {
            JSONObject jSONObject7 = new JSONObject();
            jSONObject7.accumulate(FirebaseAnalytics.Param.ITEMS, fo.a(this.h));
            jSONObject6.accumulate("item_list", jSONObject7);
        }
        JSONArray jSONArray = new JSONArray();
        jSONArray.put(jSONObject6);
        jSONObject2.accumulate("transactions", jSONArray);
        if (d.b((CharSequence) this.m)) {
            jSONObject6.accumulate("invoice_number", this.m);
        }
        if (d.b((CharSequence) this.n)) {
            jSONObject6.accumulate(NotificationFormatHelper.PAYLOAD_OS_ROOT_CUSTOM, this.n);
        }
        if (d.b((CharSequence) this.o)) {
            jSONObject6.accumulate("soft_descriptor", this.o);
        }
        if (d.b((CharSequence) this.p)) {
            JSONObject jSONObject8 = new JSONObject();
            jSONObject8.accumulate("email", this.p);
            jSONObject6.accumulate("payee", jSONObject8);
        }
        JSONObject jSONObject9 = new JSONObject();
        jSONObject9.accumulate("device_info", d.a(em.a().toString()));
        jSONObject9.accumulate("app_info", d.a(eh.a().toString()));
        jSONObject9.accumulate("risk_data", d.a(ao.a().c().toString()));
        JSONObject jSONObject10 = new JSONObject();
        jSONObject10.accumulate("payment", jSONObject2);
        jSONObject10.accumulate("client_info", jSONObject9);
        if (this.l) {
            jSONObject10.accumulate("retrieve_shipping_addresses", true);
        }
        jSONObject10.accumulate("no_shipping", Boolean.valueOf(this.j));
        return jSONObject10.toString();
    }

    @Override
    public final void c() {
        JSONObject m = m();
        this.a = m.optString("payment_id");
        this.b = m.getString("session_id");
        this.c = m.optJSONArray("addresses");
        JSONObject optJSONObject = m.optJSONObject("funding_options");
        if (optJSONObject != null) {
            this.d = optJSONObject.optJSONObject("default_option");
            this.e = optJSONObject.optJSONArray("alternate_options");
        }
    }

    public final fg d(String str) {
        this.m = str;
        return this;
    }

    @Override
    public final void d() {
        b(m());
    }

    public final fg e(String str) {
        this.n = str;
        return this;
    }

    @Override
    public final String e() {
        return "{    \"session_id\":\"7N0112287V303050T\",    \"payment_id\":\"PAY-18X32451H0459092JKO7KFUI\",    \"addresses\": [          {             \"city\": \"Columbia\",              \"line2\": \"6073 2nd Street\",              \"line1\": \"Suite 222\",              \"recipient_name\": \"Beverly Jello\",             \"state\": \"MD\",              \"postal_code\": \"21045\",             \"default_address\": false,              \"country_code\": \"US\",              \"type\": \"HOME_OR_WORK\",              \"id\": \"366853\"          },          {             \"city\": \"Austin\",              \"line2\": \"Apt. 222\",              \"line1\": \"52 North Main St. \",              \"recipient_name\": \"Michael Chassen\",             \"state\": \"TX\",              \"postal_code\": \"78729\",             \"default_address\": true,              \"country_code\": \"US\",              \"type\": \"HOME_OR_WORK\",              \"id\": \"366852\"          },          {             \"city\": \"Austin\",              \"line1\": \"202 South State St. \",              \"recipient_name\": \"Sam Stone\",             \"state\": \"TX\",              \"postal_code\": \"78729\",             \"default_address\": true,              \"country_code\": \"US\",              \"type\": \"HOME_OR_WORK\",              \"id\": \"366852\"          }     ],     \"funding_options\":{       \"default_option\":{          \"id\":\"1\",          \"backup_funding_instrument\":{             \"payment_card\":{                \"number\":\"8029\",                \"type\":\"VISA\"             }          },          \"funding_sources\":[             {                \"amount\":{                   \"value\":\"216.85\",                   \"currency\":\"USD\"                },                \"funding_instrument_type\":\"BANK_ACCOUNT\",                \"funding_mode\":\"INSTANT_TRANSFER\",                \"bank_account\":{                   \"bank_name\":\"SunTrust\",                   \"account_number\":\"7416\",                   \"account_number_type\":\"BBAN\",                   \"country_code\":\"US\",                   \"account_type\":\"CHECKING\"                }             },             {                \"amount\":{                   \"value\":\"6.00\",                   \"currency\":\"USD\"                },                \"funding_instrument_type\":\"CREDIT\",                \"funding_mode\":\"INSTANT_TRANSFER\",                \"credit\":{                   \"type\":\"BILL_ME_LATER\",                   \"id\":\"mock-id\"                }             }          ]       },       \"alternate_options\":[          {             \"id\":\"2\",             \"funding_sources\":[                {                   \"amount\":{                      \"value\":\"216.85\",                      \"currency\":\"USD\"                   },                   \"funding_instrument_type\":\"PAYMENT_CARD\",                   \"payment_card\":{                      \"number\":\"8029\",                      \"type\":\"VISA\"                   },                   \"funding_mode\":\"INSTANT_TRANSFER\"                },                {                   \"amount\":{                      \"value\":\"6.00\",                      \"currency\":\"USD\"                   },                   \"funding_instrument_type\":\"BALANCE\",                   \"funding_mode\":\"INSTANT_TRANSFER\"                }             ]          },          {             \"id\":\"3\",             \"funding_sources\":[                {                   \"amount\":{                      \"value\":\"216.85\",                      \"currency\":\"USD\"                   },                   \"funding_instrument_type\":\"PAYMENT_CARD\",                   \"payment_card\":{                      \"number\":\"8011\",                      \"type\":\"VISA\"                   },                   \"funding_mode\":\"INSTANT_TRANSFER\"                },                {                   \"amount\":{                      \"value\":\"6.00\",                      \"currency\":\"USD\"                   },                   \"funding_instrument_type\":\"BALANCE\",                   \"funding_mode\":\"INSTANT_TRANSFER\"                }             ]          }       ]    } }";
    }

    public final fg f(String str) {
        this.o = str;
        return this;
    }

    public final fg g(String str) {
        this.p = str;
        return this;
    }

    public final String t() {
        return this.a;
    }

    public final String u() {
        return this.b;
    }

    public final JSONArray v() {
        return this.c;
    }

    public final JSONObject w() {
        return this.d;
    }

    public final JSONArray x() {
        return this.e;
    }
}