title: In App Purchase from Amazon Apps & Games Developer for Android
body: <p>My App is working fine with APP tester. But when I release the app in [Amazon Apps &amp; Games Developer][1]</p>
  
  <p>I have imported sample app(1.0 version) from Apps-SDK.</p>
  
  <p>I just changed code at one place in MySku.java</p>
  
  <pre><code>/*MY_MAGAZINE_MONTHLY(
          "com.amazon.sample.iap.subscription.mymagazine.month",
          "com.amazon.sample.iap.subscription.mymagazine");*/
  </code></pre>
  
  <p>with below lines </p>
  
  <pre><code>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() + ")");
  }
  </code></pre>
  
  <p>Even after migrating to version 2.0 IAP</p>
  
  <p>I am getting <strong>"An error occurred while processing your purchase"</strong>. See below image</p>
  
  <p>![enter image description here][2]</p>
  
  <p>Please help me</p>
  
  <p>Here is the Logcat</p>
  
  <pre><code>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) 
  </code></pre>