亚马逊在应用程序内购买亚马逊、应用程序

2023-09-05 10:29:56 作者:叛逆者°

有没有人尝试过​​实施亚马逊的应用程序内购买?我有问题,实现在其网站上的例子。下面的例子,它给了我INVALID_SKU响应:

has anybody tried implementing amazon's in-app purchase? I'm having problem implementing the example on their site. below example, it's giving me INVALID_SKU response:

在开始购买,

PurchasingManager.initiateItemDataRequest(DeveloperSKU-1234);

上面的响应将由:收到跌破code:

the response of above will be recieved by below code:

public void onPurchaseResponse(final PurchaseResponse purchaseResponse) {
    Log.v(TAG, "onPurchaseResponse recieved");
    Log.v(TAG, "PurchaseRequestStatus:" + purchaseResponse.getPurchaseRequestStatus());
}

不幸的是,我总是得到。PurchaseRequestStatus:INVALID_SKU

unfortunately, i always got "PurchaseRequestStatus:INVALID_SKU".

任你知道如何使这项工作或做你知道一个好的网站教程?

any of you knows how to make this work or do you know a good site for the tutorial?

此外,在他们的网站,对话框应该显示,如果我得到了一个INVALID_SKU,我没有得到任何。

Also at their site, dialog box should show if I got an INVALID_SKU which I didnt get any.

推荐答案

INVALID_SKU时SKU不匹配或JSON文件中没有输入发生。如果要实现使用SDK测试仪测试应用程序,那么请确保您在您的应用程序所使用的SKU必须在JSON文件中的条目太多。 JSON文件驻留在到/ mnt / SD卡/名为amazon.sdktester.json。请求您确认是否已创建了SKU的细节JSON文件中的设备此路径下。

INVALID_SKU occurs when SKU is not matching or not entered in JSON file. If you are implementing your test app using SDK Tester, then please make sure that the SKU which you are using in your app must have an entry in JSON file too. JSON files resides under /mnt/sdcard/ with name amazon.sdktester.json. Request you to verify whether you have created JSON file with SKU details under this path in the device.

管理SKU的将是一个很好的方法:

A good approach for managing SKUs would be:

在参考的SKU在您的应用程序的strings.xml文件中的字符串 - 你可以使用任何字符串相同的方式不变 您可以使用SDK测试仪和amazon.sdktester.json文件,而无需在开发者门户网站做任何测试您的应用程序。 当你准备(与SDKTester测试后),提交您的应用程序,请确保您还提交了IAP项目上的开发者门户网站 - !注意有无错别字

我们建议使用。一个SKU的格式,只是因为它使明显的它是什么,什么应用程序,它属于。例如:

We recommend using . for a SKU format, just because it makes it obvious what it is and what app it belongs to. For example:

com.yoyodyne.beachblanketbingo.500_coins

com.yoyodyne.beachblanketbingo.500_coins