- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
80 lines
2.2 KiB
Java
80 lines
2.2 KiB
Java
package com.firemonkeys.cloudcellapi.util;
|
|
|
|
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
|
|
import com.unity3d.ads.core.domain.HandleInvocationsFromAdViewer;
|
|
import com.unity3d.ads.metadata.InAppPurchaseMetaData;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class Purchase {
|
|
String mDeveloperPayload;
|
|
String mItemType;
|
|
String mOrderId;
|
|
String mOriginalJson;
|
|
String mPackageName;
|
|
int mPurchaseState;
|
|
long mPurchaseTime;
|
|
String mSignature;
|
|
String mSku;
|
|
String mToken;
|
|
|
|
public String getDeveloperPayload() {
|
|
return this.mDeveloperPayload;
|
|
}
|
|
|
|
public String getItemType() {
|
|
return this.mItemType;
|
|
}
|
|
|
|
public String getOrderId() {
|
|
return this.mOrderId;
|
|
}
|
|
|
|
public String getOriginalJson() {
|
|
return this.mOriginalJson;
|
|
}
|
|
|
|
public String getPackageName() {
|
|
return this.mPackageName;
|
|
}
|
|
|
|
public int getPurchaseState() {
|
|
return this.mPurchaseState;
|
|
}
|
|
|
|
public long getPurchaseTime() {
|
|
return this.mPurchaseTime;
|
|
}
|
|
|
|
public String getSignature() {
|
|
return this.mSignature;
|
|
}
|
|
|
|
public String getSku() {
|
|
return this.mSku;
|
|
}
|
|
|
|
public String getToken() {
|
|
return this.mToken;
|
|
}
|
|
|
|
public Purchase(String str, String str2, String str3) throws JSONException {
|
|
this.mItemType = str;
|
|
this.mOriginalJson = str2;
|
|
JSONObject jSONObject = new JSONObject(this.mOriginalJson);
|
|
this.mOrderId = jSONObject.optString("orderId");
|
|
this.mPackageName = jSONObject.optString(HandleInvocationsFromAdViewer.KEY_PACKAGE_NAME);
|
|
this.mSku = jSONObject.optString(InAppPurchaseMetaData.KEY_PRODUCT_ID);
|
|
this.mPurchaseTime = jSONObject.optLong("purchaseTime");
|
|
this.mPurchaseState = jSONObject.optInt("purchaseState");
|
|
this.mDeveloperPayload = jSONObject.optString(SDKConstants.PARAM_DEVELOPER_PAYLOAD);
|
|
this.mToken = jSONObject.optString("token", jSONObject.optString(SDKConstants.PARAM_PURCHASE_TOKEN));
|
|
this.mSignature = str3;
|
|
}
|
|
|
|
public String toString() {
|
|
return "PurchaseInfo(type:" + this.mItemType + "):" + this.mOriginalJson;
|
|
}
|
|
}
|