错误922922691付款例外

时间:2014-12-22 15:59:12

标签: in-app-purchase

我在黑莓BBOS的应用程序购买中遇到问题。 我有这段代码:

        try {
            PaymentEngine.isAppWorldInstalledAndAtCorrectVersion();
        } catch (AppWorldUpdateRequired awur) {
            PaymentEngine.upDateAppWorld();
        }
        engine = PaymentEngine.getInstance();
        if (engine != null) {
            PurchaseArgumentsBuilder arguments = new PurchaseArgumentsBuilder()
            .withDigitalGoodSku( "sku-from the appworld" )
            .withDigitalGoodName( "name of the good" )
            .withMetadata("name of the good")
            .withPurchasingAppName("Payment Service SDK Demo");
            try {
                Purchase purchase = engine.purchase(arguments.build()); 
                //Dialog.inform("Purchase of " + purchase.getMetadata() + " is successful.");
            }
            catch (IllegalArgumentException e){ 
                Dialog.inform(e.getMessage()); 
            }
            catch (PaymentException e) { 
                Dialog.inform(e.getMessage() + " - " + e.getFailureReason());
                //it enters here and give me the error (REASON_CANCELED)
            }
        }
        else{
            //Unavailable purchase
        } 

我测试了这段代码购买开始正确但是在放入黑莓ID和密码后输入PaymentException并且我有这个错误代码922922691(REASON_CANCELED),但我没有取消任何操作如何解决这个问题,请指教。

提前谢谢。

0 个答案:

没有答案