找不到您要购买的商品

时间:2019-08-22 13:56:45

标签: android in-app-billing

在我的Android应用中,我想使用计费服务。所以这里的代码:

  import com.android.vending.billing.IInAppBillingService;
         public static final int GOOGLE_API_VERSION = 3;

         private IInAppBillingService billingService;

 private ServiceConnection serviceConnection = new ServiceConnection() {
        @Override
        public void onServiceDisconnected(ComponentName name) {
            billingService = null;
        }

        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
            billingService = IInAppBillingService.Stub.asInterface(service);

        }
    };

   bundle = billingService.getBuyIntent(Constants.GOOGLE_API_VERSION,
                        contextPackageName,
                        productId,
                        purchaseType,
                        purchasePayload);

  Log.d(LOG_TAG, "purchase: call_getBuyIntent() -> bundle = " + AndroidUtil.bundle2String(bundle));

     activity.startIntentSenderForResult(pendingIntent.getIntentSender(),
                                    PURCHASE_FLOW_REQUEST_CODE,
                                    new Intent(), 0, 0, 0);

但是我收到此错误消息:

enter image description here

此处捆绑商品值:

purchase: call_getBuyIntent() -> bundle = 
BUNDLE(2):
[RESPONSE_CODE = 0]
[BUY_INTENT = PendingIntent{c4efeca: android.os.BinderProxy@980383b}]

0 个答案:

没有答案