@@ -0,0 +1,3401 @@
+/* Copyright (c) 2016 HoNKoT.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.honkot.android.billingcontroller;%0A%0A/**%0A * Controller of IInAppBillingService.%3Cbr /%3E%0A * You need IInAppBillingService.aidl and complete build including it before use this class.%0A */%0Apublic class BillingContoroller %7B%0A    /** Test product ID which can be purchased */%0A    public static final String TESTPRODUCT_PURCHASED = %22android.test.purchased%22;%0A    /** Test product ID which can be canceled */%0A    public static final String TESTPRODUCT_CANCELED = %22android.test.canceled%22;%0A    /** Test product ID which can be refunded */%0A    public static final String TESTPRODUCT_REFUNDED = %22android.test.refunded%22;%0A    /** Test product ID which cannot find any product ID */%0A    public static final String TESTPRODUCT_ITEM_UNAVAILABLE = %22android.test.item_unavailable%22;%0A%0A    /** 0 if the purchase was success, error otherwise. */%0A    public static final String RESPONSE_CODE = %22RESPONSE_CODE%22;%0A    /** A String in JSON format that contains details about the purchase order.%3Cbr /%3E%0A     *  See table 4 for a description of the JSON fields. */%0A    public static final String INAPP_PURCHASE_DATA = %22INAPP_PURCHASE_DATA%22;%0A    /** String containing the signature of the purchase data that was signed with the private key of the developer. */%0A    public static final String INAPP_DATA_SIGNATURE = %22INAPP_DATA_SIGNATURE%22;%0A%0A    /**%0A     * From Android Developer webpage.%0A     * @link https://developer.android.com/google/play/billing/billing_reference.html#billing-codes%0A     */%0A    /** Success */%0A    public static final Integer BILLING_RESPONSE_RESULT_OK     = 0;%0A    /** User pressed back or canceled a dialog */%0A    public static final Integer BILLING_RESPONSE_RESULT_USER_CANCELED  = 1;%0A    /** Network connection is down */%0A    public static final Integer BILLING_RESPONSE_RESULT_SERVICE_UNAVAILABLE = 2;%0A    /** Billing API version is not supported for the type requested */%0A    public static final Integer BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE = 3;%0A    /** Requested product is not available for purchase */%0A    public static final Integer BILLING_RESPONSE_RESULT_ITEM_UNAVAILABLE = 4;%0A    /** Invalid arguments provided to the API.%0A     *  This error can also indicate that the application was not correctly signed or properly set up%0A     *  for In-app Billing in Google Play, or does not have the necessary permissions in its manifest */%0A    public static final Integer BILLING_RESPONSE_RESULT_DEVELOPER_ERROR  = 5;%0A    /** Fatal error during the API action */%0A    public static final Integer BILLING_RESPONSE_RESULT_ERROR    = 6;%0A    /** Failure to purchase since item is already owned */%0A    public static final Integer BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED = 7;%0A    /** Failure to consume since item is not owned */%0A    public static final Integer BILLING_RESPONSE_RESULT_ITEM_NOT_OWNED  = 8;%0A%7D%0A

Create BillingController.java and defined valiable