Tag: in app purchase

Android InApp购买 – 如何处理待处理状态?

我正在将Android In-App购买与Android Native应用程序集成。 我使用以下代码启动In-App购买意图! Bundle buyIntentBundle = mService.getBuyIntent(3, getPackageName(),”product_sku”, “inapp”,”Some Developer Payload”); PendingIntent pendingIntent = buyIntentBundle.getParcelable(“BUY_INTENT”); startIntentSenderForResult(pendingIntent.getIntentSender(),REQUEST_CODE, new Intent(),Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0)); 以上代码正在使用并打开Goog​​le Play以进行应用内购买。 我重写了onActivityResult以获取应用程序内购买的结果(以下是代码) protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 1001) { if (resultCode == RESULT_OK) { try { final JSONObject jo = new JSONObject(purchaseData); String orderId = jo.getString(“orderId”); […]