android 应用内测试错误

标签 android in-app-purchase

我正在开发包含 10 个应用内产品的 android 应用内产品。我完成了 Android 计费库、Google 测试帐户和设置产品 ID 的集成,但是当我点击“接受并购买”按钮时,出现以下错误

your order could not be processed please try again.

这个错误的原因是什么。我做错了什么?

public void onClick(View v){ 
    if(BillingController.isPurchased(context, MainActivity.ITEM_ID[position])) { 
        String msg=(String) holder.txtViewname.getText(); 
        Intent intent= new Intent(context,RecipeMenu.class); 
        intent.putExtra("name", msg); 
        intent.putExtra("id", position); 
        context.startActivity(intent); } 
    else{ 
        BillingController.requestPurchase(context, MainActivity.ITEM_ID[position], true /* confirm */); 
    } 
} 
}); 

最佳答案

Android 为我们提供了一个相同的应用内结算示例。请引用Android In-app .其名称是 market_billing。您可以在 android-sdk/extras/google/market_billing 找到它。

关于android 应用内测试错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11839245/

相关文章:

iphone - 通过应用内购买将 iPhone 应用提交到 App Store

ios - iOS 非消耗品购买是否与使用帐户或设备绑定(bind)?

ios - 如何实现内购赠送?

ios - 应用程序收据是否会在交易完成前反射(reflect)有效订阅?

iphone - SKPaymentQueue defaultQueue finishTransaction : not finishing transaction

java - 使用 rxAndroid 的 URL.openStream networkOnMainThread

java - TextView 中部分左对齐和部分右对齐的文本。为什么这不起作用?

android - 在 Android SQLite 中从哪里获取数据库错误信息(例如,由于违反 not null 而导致插入失败)

java - 如何获取动态创建的微调器 android java 的选定值

android - 如何在 Android 上停止 HttpURLConnection 连接