正在查看: Clash Legends v0.0.1 应用的 fd.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 fd.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.paypal.android.sdk;
import com.paypal.android.sdk.payments.PayPalPayment;
import com.payu.upisdk.util.UpiConstant;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class fd extends fq {
private final String a;
private final String b;
private final boolean c;
private final JSONObject d;
private final JSONObject e;
private JSONObject f;
private String g;
private String h;
private String i;
private String j;
public fd(cx cxVar, b bVar, String str, String str2, boolean z, String str3, String str4, String str5, String str6, JSONObject jSONObject, JSONObject jSONObject2) {
super(df.ApproveAndExecuteSfoPaymentRequest, cxVar, bVar, str);
this.c = z;
this.a = str5;
this.b = str6;
this.d = jSONObject;
this.e = jSONObject2;
a("PayPal-Request-Id", str2);
if (d.b((CharSequence) str3)) {
a("PayPal-Partner-Attribution-Id", str3);
}
if (d.b((CharSequence) str4)) {
a("PayPal-Client-Metadata-Id", str4);
}
}
private static String a(JSONArray jSONArray) {
JSONArray jSONArray2;
JSONObject jSONObject;
if (jSONArray == null) {
return null;
}
try {
JSONObject jSONObject2 = jSONArray.getJSONObject(0);
if (jSONObject2 == null || (jSONArray2 = jSONObject2.getJSONArray("related_resources")) == null || (jSONObject = jSONArray2.getJSONObject(0)) == null) {
return null;
}
JSONObject optJSONObject = jSONObject.optJSONObject("authorization");
if (optJSONObject != null) {
return optJSONObject.optString("id");
}
JSONObject optJSONObject2 = jSONObject.optJSONObject("order");
if (optJSONObject2 != null) {
return optJSONObject2.optString("id");
}
JSONObject optJSONObject3 = jSONObject.optJSONObject(PayPalPayment.PAYMENT_INTENT_SALE);
if (optJSONObject3 != null) {
return optJSONObject3.optString("id");
}
return null;
} catch (JSONException e) {
return null;
}
}
@Override
public final String b() {
JSONObject jSONObject = new JSONObject();
jSONObject.accumulate("payment_id", this.a);
jSONObject.accumulate("session_id", this.b);
JSONObject jSONObject2 = this.e;
if (jSONObject2 != null) {
jSONObject.accumulate("funding_option", jSONObject2);
}
JSONObject jSONObject3 = this.d;
if (jSONObject3 != null) {
jSONObject.accumulate("shipping_address", jSONObject3);
}
JSONObject jSONObject4 = new JSONObject();
jSONObject4.accumulate("device_info", d.a(em.a().toString()));
jSONObject4.accumulate("app_info", d.a(eh.a().toString()));
jSONObject4.accumulate("risk_data", d.a(ao.a().c().toString()));
jSONObject.accumulate("client_info", jSONObject4);
return jSONObject.toString();
}
@Override
public final void c() {
try {
JSONObject jSONObject = m().getJSONObject("payment");
this.f = jSONObject;
this.g = jSONObject.optString("state");
this.h = this.f.optString("create_time");
this.i = this.f.optString(UpiConstant.UPI_INTENT_S);
this.j = a(this.f.getJSONArray("transactions"));
} catch (JSONException e) {
d();
}
}
@Override
public final void d() {
b(m());
}
@Override
public final String e() {
return "{ \"payment\": { \"id\": \"PAY-6PU626847B294842SKPEWXHY\", \"transactions\": [ { \"amount\": { \"total\": \"2.85\", \"details\": { \"subtotal\": \"2.85\" }, \"currency\": \"USD\" }, \"description\": \"Awesome Sauce\", \"related_resources\": [ { \"sale\": { \"amount\": { \"total\": \"2.85\", \"currency\": \"USD\" }, \"id\": \"5LR21373K59921925\", \"parent_payment\": \"PAY-6PU626847B294842SKPEWXHY\", \"update_time\": \"2014-07-18T18:47:06Z\", \"state\": \"completed\", \"create_time\": \"2014-07-18T18:46:55Z\", \"links\": [ { \"method\": \"GET\", \"rel\": \"self\", \"href\": \"https://www.stage2std019.stage.\" }, { \"method\": \"POST\", \"rel\": \"refund\", \"href\": \"https://www.stage2std019.stage. \" }, { \"method\": \"GET\", \"rel\": \"parent_payment\", \"href\": \"https://www.stage2std019.stage.PEWXHY \" } ] } } ] } ], \"update_time\": \"2014-07-18T18:47:06Z\", \"payer\": { \"payer_info\": { \"shipping_address\": { } }, \"payment_method\": \"paypal\" }, \"state\": \"approved\", \"create_time\": \"2014-07-18T18:46:55Z\", \"links\": [ { \"method\": \"GET\", \"rel\": \"self\", \"href\": \"https://www.stage2std019.stage.paypal.\" } ], \"intent\": \"sale\" } } ";
}
@Override
public final void l() {
ao.a().f();
}
public final String t() {
return this.a;
}
public final boolean u() {
return this.c;
}
public final String v() {
return this.g;
}
public final String w() {
return this.h;
}
public final String x() {
return this.i;
}
public final String y() {
return this.j;
}
}