0

I have a lot of cancelled purchased. all, because the user didn't confirm his credit card.

I checked one of my successful purchased. There is a table that shows order history for this individual purchase/order.

Oct 24 4:43 PM Charged The customer's credit card was successfully charged for £6.50.

Oct 24 4:43 PM Charging You initiated a charge of £6.50 to the customer's credit card.

Oct 24 10:42 AM Chargeable The order was delivered.

Oct 24 10:42 AM Chargeable The customer's credit card was authorized for £6.50 and passed all risk checks. (Expires Oct 31, 2013 10:42:30 AM PDT).

Oct 24 10:42 AM Pending You received a new order. Google has sent the customer an order confirmation email.

Google has sent the customer an order confirmation email.

Other cancelled orders only have the last msg and order get expired and then cancelled automatically. because user didn't confirm his credit card.

Question: in fail case. I don't really know if the customer managed to open my product. does my app receive a successful purchase or not?

Does onIabPurchaseFinished(IabResult result, Purchase purchase) in IabHelper.OnIabPurchaseFinishedListener() get called with a successful purchase before customer confirmation for the order or credit card confirmation?

public void onIabPurchaseFinished(IabResult result, Purchase purchase) {
        Log.d(TAG, "Purchase finished: " + result + ", purchase: " + purchase);
        if (result.isFailure()) {
            complain("Error purchasing: " + result);
            setWaitScreen(false);
            return;
        }

        if (!verifyDeveloperPayload(purchase)) {
            complain("Error purchasing. Authenticity verification failed.");
            setWaitScreen(false);
            return;
        }

        Log.d(TAG, "Purchase successful.");

        if (purchase.getSku().equals(video.storeId)) {
            Log.d(TAG, "Video owned now. go to download.");
            SharedPreferences.Editor spe = PreferenceManager.getDefaultSharedPreferences(VideoHome.this).edit();
            spe.putInt(video.storeId, 1);
            spe.commit();
            videos.clear();
            loadVideos();
            videoClicked(video);
        }
    }
Maulik
  • 3,316
  • 20
  • 31
hasan
  • 23,815
  • 10
  • 63
  • 101
  • onIabPurchaseFinished listener will be called only when your item is successfully purchase. And if you know for the other cases like cancel purchase and other scenario then you can check it by onActivityResult(). check this link: http://stackoverflow.com/questions/19152065/in-app-billing-v3-error-in-activity-result/19158121#19158121 – Maulik Oct 29 '13 at 13:35
  • you can get purchased information using getSkuDetail() method and using hasPurchase(SKU) method to verify whether this user has been purchased this item before accessing your purchased item. Let me know if you have still any queries.http://developer.android.com/google/play/billing/billing_integrate.html#billing-requests and http://stackoverflow.com/questions/19658550/get-purchased-item-detail-at-start-of-app-with-iabhelper-android – Maulik Oct 30 '13 at 07:33
  • It's less priority now. I have a lot of work on other projects. don't time to investigate this issue more. Thank you very much. I will get back to this later. – hasan Oct 30 '13 at 12:05

0 Answers0