亚马逊应用内支付 [英] In-App payment in amazon

查看:21
本文介绍了亚马逊应用内支付的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照以下步骤进行操作 如图 ..In AppPayment amazon 中的步骤但问题是当我运行 sdk 中提供的代码时,如图 4 所示,当我单击时按钮应该扣除点击次数,但事实并非如此.在这些步骤中,我已经将以下值放在 string.xml 中吗?

I have followed the following steps As shown in image ..steps in In AppPayment amazon but the problem is when i run the code provided in sdk as shown in image 4 when i click the button the number of clicks should be deducted but it is not. I have place the follwing values in string.xml m i right in theses steps?

  <string name="app_name">amazoncheckout</string>
 <string name="nothing"></string>
<string name="consumable_sku">com.amazon.checkout</string>
<string name="entitlement_sku_purple">com.amazoncheckoutconsumable</string>
<string name="entitlement_sku_green">com.amazoncheckoutentitlementn</string>
<string name="entitlement_sku_blue">com.amazon.buttonclicker.blue_button</string>
<string name="parent_subscription_sku">com.amazoncheckoutsubscription</string>
<string  name="child_subscription_sku_monthly">com.amazoncheckoutsubscriptionmonthly</string>

上面的sku是我自己生成的,我也想知道图三的json文件,我已经下载好了在 assert 文件夹中 .. 这个 json 文件是做什么用的?请对我错误的步骤提供评论......点击数字显示为 5 但当我点击它时没有扣除为什么?任何帮助将被应用......谢谢

The above sku is generated by me and i also want to know the the json file shown in image three , i have downloaded that and placed in assert folder .. what is this json file for ? kind provide comment on my steps where i m wrong ... the click number is shown 5 but when i click it is not deducted why? any help will be appricated .... Thanks

推荐答案

我将尝试解释如何让演示工作,因为,我认为,这是你的问题,如果我错了,抱歉...

I'm going to try to explain how can you have the demo working, because, I think, that's your question, sorry if I'm wrong...

  1. 在您的设备中安装 AmazonSDKTester.apk 并打开它.它位于 SDK 包中的 tools 文件夹内.要安装它,您可以在终端中使用:

  1. Install the AmazonSDKTester.apk in your device and open it. It's inside tools folder in the SDK package. For install it you can use in terminal:

adb install AmazonSDKTester.apk

接下来将您的项目添加到 Eclipse:

<代码>文件>新 >Project...>Android Project from Existing Code ,浏览 SDK 文件夹中的 Button Clicker Demo Project 并完成.

将 amazon.sdktester.json 文件复制到 SD 内存.在 ButtonClicker 项目文件夹中,转到 assets 文件夹并将 amazon.sdktester.json 文件添加到 SD 内存中.一种简单的方法是使用 DDMS 文件资源管理器将文件拖到 SD 文件夹.您的 SD 文件夹可能因设备而异,在我的 Nexus S 中就像您在图片中看到的一样.

Copy the amazon.sdktester.json file to SD memory. In the ButtonClicker project folder, go to assets folder and add the amazon.sdktester.json file to the SD memory. An easy way it's dragging the file to the SD folder using DDMS file explorer. Your SD folder may be different depends on device, in my Nexus S is like you can see in the image.

就是这样,您必须让 Button Clicker Demo 示例完全正常工作.当您进行购买时,您可以转到 AmazonSDKTester 并查看您的所有购买.希望它可以帮助您并解决您的问题.

And that's it, you must have Button Clicker Demo sample fully working. When you make a purchase you can go to the AmazonSDKTester and see all your purchases. Hope it helps you and solves your problem.

更新:

我要复制 &从开发人员文档中粘贴一些文本 (请阅读此文档,因为它很好地解释了一切),我希望这对您有所帮助:

I'm going to copy & paste some text from developer docs (please read this doc because it explains everything great) and I hope this helps you:

SDK Tester 是一种开发人员工具,允许亚马逊移动应用程序开发工具包的用户在将其提交给亚马逊发布之前在类似生产的环境中测试他们的实施.这将允许开发人员构建涵盖 Amazon 移动应用程序开发工具包 API 生成的所有响应的测试用例,并让他们确信他们的应用程序将被发布并正确运行.

The SDK Tester is a developer tool that allows users of the Amazon Mobile App SDK to test their implementation in a production-like environment before submitting it to Amazon for publication. This will allow developers to construct test cases that cover all responses generated by the Amazon Mobile App SDK APIs, and give them confidence their apps will be published and run correctly.

这意味着,您必须在类似生产的环境中使用 AmazonSDKTester.apk 进行测试,一旦成功,您就可以提交您的应用以供发布.

That means, you must use the AmazonSDKTester.apk for test in a production-like environment, once it works you can submit your app for publication.

SDK 测试器使用 JavaScript 对象表示法 (JSON) 文本文件来包含用于响应 IAP API 调用的 IAP 项目信息.此文件驻留在包含被测应用程序和 SDK 测试器的设备上.创建后,该文件需要驻留在设备的文件系统中,路径为:/mnt/sdcard/amazon.sdktester.json

The SDK Tester Uses a JavaScript Object Notation (JSON) text file to contain the IAP item information used to respond to IAP API calls. This file resides on the device containing the app under test and the SDK Tester. Once created, the file needs to reside on the device's file system under the path: /mnt/sdcard/amazon.sdktester.json

点击次数不会减少,因为当点击按钮时,由于在 sd 卡路径中找不到 .json 文件,返回 SKU INVALID 消息(查看 logcat).

The click number doesn't decrease because when is clicked the button a SKU INVALID message is returned ( Look at the logcat ) due to no .json file is found in the sd card path.

这篇关于亚马逊应用内支付的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆