Search code examples
androidin-app-purchase

Usage of In app purchase in my app, requires information?


I have an app that can be downloaded from google play using In-app purchase.

  1. I am using sample product id android.test.purchased to purchase product from google play. I am able to purchase the product and getting toast message Thank you. Your item will appear shortly but i am unable to see logcat messages and item what i purchased . this is the code i am using

    public Handler mTransactionHandler = new Handler() {
    public void handleMessage(android.os.Message msg) {
        Log.i(TAG, "Transaction complete");
        Log.i(TAG, "Transaction status: " + BillingHelper.latestPurchase.purchaseState);
        Log.i(TAG, "Item purchased is: " + BillingHelper.latestPurchase.productId);
    
        if (BillingHelper.latestPurchase.isPurchased()) {
            Log.i(TAG, " is purchased completed ");
            showItem();
        }
    };
    

    };

  2. If i use my own product Id for purchase, is it necessary to give original credit card details ? To purchase products, i am using test account as primary account in the device.


Solution

  • Docs says that, to purchase own product for testing it is necessary to give original credit card details although funding (transaction of money) wont happens overthere..It seems to be virtual transaction from testing account..