List of usage examples for com.badlogic.gdx.pay Transaction getIdentifier
public String getIdentifier()
From source file:com.badlogic.gdx.pay.android.googleplay.testdata.GetPurchasesResponseObjectMother.java
private static ArrayList<String> makeStringArrayListForTransaction(Transaction transaction) { ArrayList<String> list = new ArrayList<>(); JSONObject jsonObject = new JSONObject(); try {/*from w w w.ja v a2 s . c o m*/ jsonObject.put(ORDER_ID, transaction.getOrderId()); jsonObject.put(PACKAGE_NAME, PACKAGE_NAME_GOOD); jsonObject.put(ORDER_ID, transaction.getOrderId()); jsonObject.put(PRODUCT_ID, transaction.getIdentifier()); jsonObject.put(PURCHASE_TIME, System.currentTimeMillis()); list.add(jsonObject.toString()); } catch (JSONException e) { throw new RuntimeException(e); } return list; }