code: private String generateOriginalJson(@NotNull PurchaseResponse purchaseResponse) {
          final JSONObject json = new JSONObject();
          try {
              Receipt receipt = purchaseResponse.getReceipt();
              json.put(JSON_KEY_ORDER_ID, purchaseResponse.getRequestId());
              json.put(JSON_KEY_PRODUCT_ID, receipt.getSku());
              final PurchaseResponse.RequestStatus requestStatus = purchaseResponse.getRequestStatus();
              if (requestStatus != null) {
                  json.put(JSON_KEY_PURCHASE_STATUS, requestStatus.name());
              }
              final UserData userData = purchaseResponse.getUserData();
              if (userData != null) {
                  json.put(JSON_KEY_USER_ID, userData.getUserId());
              }
              final ProductType productType = receipt.getProductType();
              if (productType != null) {
                  json.put(JSON_KEY_RECEIPT_ITEM_TYPE, productType.name());
              }
              json.put(JSON_KEY_RECEIPT_PURCHASE_TOKEN, receipt.getReceiptId());
              Logger.d("generateOriginalJson(): JSON\n", json);
          } catch (JSONException e) {
              Logger.e("generateOriginalJson() failed to generate JSON", e);
          }
          return json.toString();
      }
docs: Converts purchase response to json for transfer with purchase object
  <p/>
  <pre>
  {
  "orderId"           : "purchaseResponse.getRequestId"
  "productId"         : "receipt.getSku"
  "purchaseStatus"    : "purchaseRequestStatus.name"
  "userId"            : "purchaseResponse.getUserId()" // if non-null
  "itemType"          : "receipt.getItemType().name()" // if non-null
  "purchaseToken"     : "receipt.getReceiptId()"
  } </pre>
  
  @param purchaseResponse Purchase to convert.
  @return Generate JSON from purchase.