从适用于 Android 的亚马逊应用和游戏开发商处购买应用内
Posted
技术标签:
【中文标题】从适用于 Android 的亚马逊应用和游戏开发商处购买应用内【英文标题】:In App Purchase from Amazon Apps & Games Developer for Android 【发布时间】:2014-10-30 10:33:46 【问题描述】:我的应用程序在 APP 测试仪上运行良好。但是当我在 [Amazon Apps & Games Developer][1] 中发布应用程序时
我已从 Apps-SDK 导入示例应用(1.0 版)。
我只是在 MySku.java 的一处更改了代码
/*MY_MAGAZINE_MONTHLY(
"com.amazon.sample.iap.subscription.mymagazine.month",
"com.amazon.sample.iap.subscription.mymagazine");*/
下面几行
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() + ")");
即使在迁移到 2.0 版 IAP 之后
我收到“处理您的购买时出错”。见下图
![在此处输入图片描述][2]
请帮帮我
这里是 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)
【问题讨论】:
请写下否决票的原因 请同时发布您的代码部分 这是一个原因:您的问题未能提供堆栈跟踪/代码来帮助识别错误或任何类型的有用信息。您希望其他人如何回答这个问题? @2Dee,谢谢你的原因。如果可能,请检查我的编辑并帮助我解决错误 我迁移到了 2.0 版。它正在抛出 purchaseRequestStatus (FAILED) 【参考方案1】:其他似乎有同样问题的人刚刚从市场上清除了缓存和数据。你可以试试看:
在亚马逊上:
-
点击右上角的“快速设置”(齿轮)图标。
从“快速设置”下拉菜单中,点击“更多...”图标。
从“设置”菜单中,点击“应用程序”。
在“应用程序”菜单中,点击以选择“Amazon App Store”。点击清除数据和清除缓存。
以下是来源:
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
【讨论】:
感谢您的回复。我已经这样做了,但对我没有用 至少给他一个赞成票:D..他为你做了谷歌搜索..尊重他的时间:D:P! 哈哈谢谢Noone,但遗憾的是,这不是正确的答案!也许它会帮助别人。 对不起,对我没用【参考方案2】:我认为这值得放在这里给所有人看,但是如果尝试通过 Google Play 以开发者身份购买自己的应用程序,则会出现完全相同的错误消息。我想有些人会想知道,这在Google 电子钱包条款和条件。
【讨论】:
以上是关于从适用于 Android 的亚马逊应用和游戏开发商处购买应用内的主要内容,如果未能解决你的问题,请参考以下文章