来自Android In App Billing版本3(TrivialDrive)的示例应用程序随附sdk
/* base64EncodedPublicKey should be YOUR APPLICATION'S PUBLIC KEY
* (that you got from the Google Play developer console). This is not your
* developer public key, it's the *app-specific* public key.
*
* Instead of just storing the entire literal string here embedded in the
* program, construct the key at runtime from pieces or
* use bit manipulation (for example, XOR with some other string) to hide
* the actual key. The key itself …Run Code Online (Sandbox Code Playgroud) 我有一个应用程序发布到alpha通道,有一个应用程序内(非)托管项目,成本为1美元.
当我正常购买时,即使用信用卡/借记卡Google返回正确的开发者有效负载字符串,但如果我选择"兑换"促销代码并输入所述代码,Google会返回一个空的开发人员有效负载字符串,因此身份验证失败'onIabPurchaseFinished()'.
我应该提一下,只有当我选择从应用程序的购买流程中兑换代码时才会出现这种情况,如果我先打开Play商店,兑换代码,然后返回并打开应用程序,一切都会完美无缺.
这是谷歌的一个错误吗?
编辑:Play商店的东西是预期的,因为它无法知道您的有效负载,购买完成后无需检查.
我正在开发一个Android应用程序,我希望该应用程序的某些功能不是免费的.
我曾考虑过使用应用内Billing Version 3 API,因此我在开发者控制台中定义了"应用内商品".
阅读文档后,我知道当我开始购买流程时,我应该传入一个字符串令牌,帮助应用程序唯一地识别进行购买的用户.
但是我如何获得识别用户的字符串标记?
谢谢
android billing in-app-purchase in-app-billing android-billing