简体   繁体   中英

Soomla IAB error while purchasing in Game on Android

im using unity 3d to make a simple game just for testing Google services, for Google play games services i use googleplayplugin and for iab the soomla plugin. i think all is configured rightly, i install and start the game on my nexus4 and login successfully . when i try to buy the thing i configured ("correctly"?) the play store popup comes up but there is my problem the popup comes with this message "Error Authentication is required. You must log in with your Google Account".

what am i missing?? im loosing hours on this, plz help. im sure,im logged in with my google profile because i see my name. here the line about the item im trying to buy

//i define the currency
public VirtualCurrency[] GetCurrencies() {
            return new VirtualCurrency[]{HEART};
        }
//the pack of currency that can be purchased
public VirtualCurrencyPack[] GetCurrencyPacks() {
            return new VirtualCurrencyPack[] {HEART_PACK};
    }
//
public const string HEART_ITEM_ID = "heart"; //in-game id
public const string HEART_PACK_PRODUCT_ID = "heart_1"; // the id on the play store

public static VirtualCurrency HEART = new VirtualCurrency(
    "HEART",        // name
    "",         // description
    HEART_ITEM_ID       // item id
    );

public static VirtualCurrencyPack HEART_PACK = new VirtualCurrencyPack(
    "1 heart",                                   // name
    "Add a heart.",                       // description
    "heart_1",                                   // item id
    1,                  // number of currencies in the pack
    HEART_ITEM_ID,                        // the currency associated with this pack
    new PurchaseWithMarket(HEART_PACK_PRODUCT_ID, 0.50)
    );

and i call to buy with

StoreInventory.BuyItem (IAPGoogle.HEART_PACK.ItemId);

代码是好的,问题出在Google开发人员控制台上,要购买,我必须发布apk,即使它是beta还是Alpha,也可以用测试人员认可的帐户进行测试。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM