0

以下を含めてください: 私は商品を購入しますが、2度目はそれを購入できません。コルドバのアプリデベロッパーの購入エラー

私はdevextremeを使用します。

はあなたのコード/段階別のプラグインで、この問題を解決することができ

inAppPurchase 
    .buy(urunID) 
    .then(function (data) { 
    return inAppPurchase.consume(data.type, data.receipt, data.signature); 
    }) 
    .then(function() { 
    alert("Satın alma Başarılı"); 
    }) 
    .catch(function (err) { 
    alert("Başarısız! "+ err); 
    }); 

答えて

0

友達を再現する:

プラグイン:

Cordova plugin add cordova-plugin-inapppurchase 

manifest.jsonを

{ "play_store_key": "YOUR PLAY STORE KEY" } 

L oadProducs機能

var productIds=['com.company.app.product1','com.company.app.product2']; 
inAppPurchase 
.getProducts(productIds) 
.then(function (products) { 

//products ok 
}) 
.catch(function (err) { 

    console.log(err); 
}); 

購入機能

var productId='com.company.app.product1'; 
     inAppPurchase 
     .buy(productId) 
     .then(function (data) { 
     console.log(JSON.stringify(data)); 
     // The consume() function should only be called after purchasing consumable products 
     // otherwise, you should skip this step 
     return inAppPurchase.consume(data.type, data.receipt, data.signature); 
     }) 
     .then(function() { 
     console.log('consume done!'); 
     //purchase ok 
     }) 
     .catch(function (err) { 
     console.log(err); 
     }); 
関連する問題