Gangadhar Nimballi
Gangadhar Nimballi

Reputation: 1534

In-App Purchase from Amazon Apps & Games Developer for Android: An error occurred while processing your purchase

My App is working fine with APP tester. But when I release the app in [Amazon Apps & Games Developer][1]

I have imported sample app(1.0 version) from Apps-SDK.

I just changed code at one place in MySku.java

/*MY_MAGAZINE_MONTHLY(
        "com.amazon.sample.iap.subscription.mymagazine.month",
        "com.amazon.sample.iap.subscription.mymagazine");*/

with below lines

MY_MAGAZINE_MONTHLY(
        "com.mycompany.appname.iap.subscription.yearly",
        "com.mycompany.appname.iap.subscription");

//Up on click subscribe button, I am calling below method from SubScriptionFragment.java
public void subscribeNow(){
    String requestId = PurchasingManager
            .initiatePurchaseRequest(MySKU.MY_MAGAZINE_MONTHLY.getSku());
    PurchaseData purchaseData = purchaseDataStorage.newPurchaseData(requestId);
    Log.i(TAG, "onBuyMagazineMonthlyClick: requestId (" + requestId 
            + ") requestState (" + purchaseData.getRequestState() + ")");
}

Even after migrating to version 2.0 IAP

I am getting "An error occurred while processing your purchase". See below image

![enter image description here][2]

Here is the Logcat

09-10 15:10:13.570: D/SampleIAPSubscriptionApp(2783): onProductDataResponse: RequestStatus (SUCCESSFUL)
09-10 15:10:13.570: D/SampleIAPSubscriptionApp(2783): onProductDataResponse: successful.  The item data map in this response includes the valid SKUs
09-10 15:10:13.570: D/SampleIAPSubscriptionApp(2783): onProductDataResponse: 0 unavailable skus
09-10 15:10:13.867: D/SampleIAPSubscriptionApp(2783): onProductDataResponse: RequestStatus (SUCCESSFUL)
09-10 15:10:13.867: D/SampleIAPSubscriptionApp(2783): onProductDataResponse: successful.  The item data map in this response includes the valid SKUs
09-10 15:10:13.867: D/SampleIAPSubscriptionApp(2783): onProductDataResponse: 0 unavailable skus
09-10 15:10:14.164: D/SampleIAPSubscriptionApp(2783): onGetUserDataResponse: requestId (e74baa85-8fde-4c0b-a29d-48a96d895feb) userIdRequestStatus: SUCCESSFUL)
09-10 15:10:14.164: D/SampleIAPSubscriptionApp(2783): onUserDataResponse: get user id (OTsvlUq0dyCGLYHVJ0BnYW5ctox_mlRblmj2RURYn3E=, marketplace (US) 
09-10 15:10:14.468: I/HomeActivity(2783):  onTabChanged 
09-10 15:10:15.023: D/SampleIAPSubscriptionApp(2783): onGetUserDataResponse: requestId (a4778610-929a-479b-a460-ace04ae76c3a) userIdRequestStatus: SUCCESSFUL)
09-10 15:10:15.023: D/SampleIAPSubscriptionApp(2783): onUserDataResponse: get user id (OTsvlUq0dyCGLYHVJ0BnYW5ctox_mlRblmj2RURYn3E=, marketplace (US) 
09-10 15:10:17.242: D/SampleIAPSubscriptionApp(2783): onPurchaseUpdatesResponse: requestId (14786842-405d-4a5e-bf4f-e218e982a2e2) purchaseUpdatesResponseStatus (SUCCESSFUL) userId (OTsvlUq0dyCGLYHVJ0BnYW5ctox_mlRblmj2RURYn3E=)
09-10 15:10:17.242: D/SampleIAPManager(2783): getSubscriptionRecord: userId (OTsvlUq0dyCGLYHVJ0BnYW5ctox_mlRblmj2RURYn3E=)
09-10 15:10:17.242: D/SampleIAPManager(2783): getSubscriptionRecord: found 0 records
09-10 15:10:17.570: D/SampleIAPSubscriptionApp(2783): onPurchaseUpdatesResponse: requestId (41f80cbe-1f76-435d-859f-0a1fcdebf684) purchaseUpdatesResponseStatus (SUCCESSFUL) userId (OTsvlUq0dyCGLYHVJ0BnYW5ctox_mlRblmj2RURYn3E=)
09-10 15:10:17.570: D/SampleIAPManager(2783): getSubscriptionRecord: userId (OTsvlUq0dyCGLYHVJ0BnYW5ctox_mlRblmj2RURYn3E=)
09-10 15:10:17.570: D/SampleIAPManager(2783): getSubscriptionRecord: found 0 records
09-10 15:10:25.148: D/HomeActivity(2783): onBuyMagazineClick: requestId (8de3c616-b5f6-41b9-98fa-ebb5d6dec9ce)
09-10 15:10:25.234: I/HomeActivity(2783): onPause
09-10 15:10:26.031: W/IInputConnectionWrapper(2783): showStatusIcon on inactive InputConnection
09-10 15:11:36.226: D/HomeActivity(2783): onResume: call getUserData
09-10 15:11:36.226: D/HomeActivity(2783): onResume: getPurchaseUpdates
09-10 15:11:36.242: D/HomeActivity(2783): onResume: call getUserData
09-10 15:11:36.242: D/HomeActivity(2783): onResume: getPurchaseUpdates
09-10 15:11:36.250: D/WebCore(2783): *-* Start browser instrument
09-10 15:11:36.258: D/WebCore(2783): *-* Start browser instrument
09-10 15:11:36.258: D/WebCore(2783): *-* Start browser instrument
09-10 15:11:36.383: I/SampleIAPSubscriptionApp(2783): onPurchaseResponse: 
09-10 15:11:36.383: I/SampleIAPSubscriptionApp(2783): onPurchaseResponse: requestId (8de3c616-b5f6-41b9-98fa-ebb5d6dec9ce) userId (OTsvlUq0dyCGLYHVJ0BnYW5ctox_mlRblmj2RURYn3E=) purchaseRequestStatus (FAILED)
09-10 15:11:36.383: D/SampleIAPSubscriptionApp(2783): onPurchaseResponse: failed so remove purchase request from local storage
09-10 15:11:36.718: D/SampleIAPSubscriptionApp(2783): onGetUserDataResponse: requestId (9b08e236-5783-49c3-94e6-554034d375df) userIdRequestStatus: SUCCESSFUL)
09-10 15:11:36.718: D/SampleIAPSubscriptionApp(2783): onUserDataResponse: get user id (OTsvlUq0dyCGLYHVJ0BnYW5ctox_mlRblmj2RURYn3E=, marketplace (US)

Upvotes: 2

Views: 2553

Answers (2)

kelevra88
kelevra88

Reputation: 1562

I thought this was worth putting here for all to see,but the exact same error message will appear if trying to buy you own app as a developer through Google Play.Thought some people would want to know ,this is detailed in the Google Wallet Terms and Conditions.

Upvotes: 0

Yoann Hercouet
Yoann Hercouet

Reputation: 17976

Other people with what seems to be the same issue just cleared the cache & data from the markets. You can give it a try:

On Amazon:

  1. Tap the "Quick Settings" (gear) icon in the upper right hand corner.
  2. From the Quick Settings drop down menu, tap the "More..." icon.
  3. From the "Settings" menu, tap "Applications."
  4. In the Applications menu, tap to select "Amazon App Store." Tap on Clear data and Clear cache.

Here are the sources:

https://help.disney.com/articles/en_US/FAQ/Where-s-My-Perry-Error-An-error-occured-while-processing-your-purchase-on-Kindle-Fire-Android-1390184965462?section=Games

http://androidforums.com/android-applications/460266-help-error-occurred-while-processing-your-purchase-please-try-again-later.html

Upvotes: 2

Related Questions