c# - Google play error when making a purchase while implementing Soomla Unity3d plugin -


i creating app implements soomla unity iap plugin. in effort iap work, have gotten point can make purchase when in editor. (not real purchase, updates virtual currency user can buy/spend in game).

when launch on android device, error: authentication required. need sign google account.

now have read multiple different articles people have had issue , nothing seems helping me.

here list of have tried far:

1) make sure app published either alpha or beta testing.(in alpha now)

2) make sure prices match game , in developer console.

3) use device logged in user not using developer email.

4) make sure email on test device listed tester in developer console.

5) make sure necessary permissions listed in android manifest.

6) confirm merchant account set correctly , verified.

7) make sure build release , not development (not sure if matters, tried both ways).

8) removed of soomla plugin project , added in while following tutorial closely makes sure nothing small missed. still no dice.

i have core , store components added scene necessary in. please let me know if have other ideas of should fix problem. in mean time, here storeassets.cs code use setting soomla:

using unityengine; using system.collections; using system.collections.generic; using soomla.store;  public class storeassets : istoreassets {     public static bool purchased = false;      public int getversion()     {         return 0;     }      public void onitempurchased(purchasablevirtualitem pvi, string payload)     {         purchased = true;     }      public virtualcurrency[] getcurrencies()      {         return new virtualcurrency[]{token_currency};     }      public virtualgood[] getgoods()      {         return new virtualgood[] {backup_forcefield, immunity, emp, multiplier};     }      public virtualcurrencypack[] getcurrencypacks()      {         return new virtualcurrencypack[] {five_token_pack, ten_token_pack, fifty_token_pack};     }      public virtualcategory[] getcategories()      {         return new virtualcategory[]{};     }      /** virtual currencies **/      public static virtualcurrency token_currency = new virtualcurrency     (         "token",                               // name         "token currency",                      // description         "token_currency_id"                    // item id     );      /** virtual currency packs **/      public static virtualcurrencypack five_token_pack = new virtualcurrencypack     (         "5 tokens",                          // name         "5 token currency units",            // description         "5_tokens_id",                       // item id         5,                                  // number of currencies in pack         "token_currency_id",                   // id of currency associated pack         new purchasewithmarket         (               // purchase type (with real money $)             "tokens_5_prod_id",                   // product id             0.99                                   // price (in real money $)         )     );      public static virtualcurrencypack ten_token_pack = new virtualcurrencypack     (         "10 tokens",                          // name         "10 token currency units",            // description         "10_tokens_id",                       // item id         10,                                  // number of currencies in pack         "token_currency_id",                   // id of currency associated pack         new purchasewithmarket         (               // purchase type (with real money $)             "tokens_10_prod_id",                   // product id             1.99                                   // price (in real money $)         )     );      public static virtualcurrencypack fifty_token_pack = new virtualcurrencypack     (         "50 tokens",                          // name         "50 token currency units",            // description         "50_tokens_id",                       // item id         50,                                  // number of currencies in pack         "token_currency_id",                   // id of currency associated pack         new purchasewithmarket         (               // purchase type (with real money $)             "tokens_50_prod_id",                   // product id             4.99                                   // price (in real money $)         )     );      /** virtual goods **/      public static virtualgood backup_forcefield = new singleusevg     (         "backupforcefield",                             // name         "secondary forcefield protection.",      // description         "bff_id",                          // item id         new purchasewithvirtualitem         (          // purchase type (with virtual currency)             "token_currency_id",                     // id of item used pay             1                                    // price (amount of coins)         )     );      public static virtualgood emp = new singleusevg     (         "emp",                             // name         "clear surrounding space of lasers.",      // description         "emp_id",                          // item id         new purchasewithvirtualitem         (          // purchase type (with virtual currency)             "token_currency_id",                     // id of item used pay             5                                    // price (amount of coins)         )     );      public static virtualgood immunity = new singleusevg     (         "immunity",                             // name         "immune damage.",      // description         "immunity_id",                          // item id         new purchasewithvirtualitem         (          // purchase type (with virtual currency)             "token_currency_id",                     // id of item used pay             10                                    // price (amount of coins)         )     );      public static virtualgood multiplier = new singleusevg     (         "multiplier",                             // name         "double score per deflected laser.",      // description         "multiplier_id",                          // item id         new purchasewithvirtualitem         (          // purchase type (with virtual currency)             "token_currency_id",                     // id of item used pay             15                                    // price (amount of coins)         )     );  } 

in order purchase items, call:

storeinventory.buyitem("the id of item"); 

to use item has been purchased, call:

storeinventory.takeitem("the id of item"); 

storeinventory class included in soomla when imported unity.

here code buying , item consumption done:

public class purchase : monobehaviour  {     public text tokens;     public static bool bfffilled = false,          immfilled = false, empfilled = false,         multfilled = false, init = false;      void start()     {         if (!init)         {             init = true;             soomlastore.initialize(new storeassets());         }         token.updatetokens (tokens);     }      void update()     {         if (storeevents.balancechanged)          {             storeevents.balancechanged = false;             token.updatetokens(tokens);         }     }      public void buyitem (int item)     {         if (item == 1)          {             storeinventory.buyitem (storeassets.five_token_pack.itemid);         }          else if (item == 2)          {             storeinventory.buyitem (storeassets.ten_token_pack.itemid);         }          else if (item == 3)          {             storeinventory.buyitem (storeassets.fifty_token_pack.itemid);         }         token.updatetokens(tokens);     }      public void getupgrade(int upgrade)     {         if (upgrade == 1)          {             bool bffnotbought = playerprefs.getint("bff available", 0) == 0;             if (storeassets.token_currency.getbalance() >= 1 && bffnotbought)             {                 playerprefs.setint("bff available", 1);                 playerprefs.save();                 bfffilled = true;                 storeinventory.takeitem(storeassets.token_currency.itemid, 1);             }         }         else if (upgrade == 2)          {             bool empnotbought = playerprefs.getint("emp available", 0) == 0;             if (storeassets.token_currency.getbalance() >= 5 && empnotbought)             {                 playerprefs.setint("emp available", 1);                 playerprefs.save();                 empfilled = true;                 storeinventory.takeitem(storeassets.token_currency.itemid, 5);             }         }             else if (upgrade == 3)          {             bool immnotbought = playerprefs.getint("imm available", 0) == 0;             if (storeassets.token_currency.getbalance() >= 10 && immnotbought)             {                 playerprefs.setint("imm available", 1);                 playerprefs.save();                 immfilled = true;                 storeinventory.takeitem(storeassets.token_currency.itemid, 10);             }         }         else if (upgrade == 4)          {             bool multnotbought = playerprefs.getint("mult available", 0) == 0;                 if (storeassets.token_currency.getbalance() >= 15 && multnotbought)             {                 playerprefs.setint("mult available", 1);                 playerprefs.save();                 multfilled = true;                 storeinventory.takeitem(storeassets.token_currency.itemid, 15);             }         }         token.updatetokens (tokens);     } } 

8/26/15

i have created both google group , google community testing app. added email other android device both of these , used link provided download app. doing of still resulted in same error before.

8/27/15

i noticed credit card on merchant account had expired. 1 of articles read mentioned having issues if there issues merchant account. have updated information , have wait deposit put in account make sure working. once done update whether or not fixed current problem.

8/31/15

after verifying merchant account on google play, still seem have same problem. fixing merchant account did not change couldn't tell.

i updated post include whole storeassets.cs script , use make purchases , consume items when player uses them. added since have no idea else issue be.

9/7/15

still no luck far. issue persists in android. editor makes test purchases purchases cannot make android device without getting same error listed above.

9/9/15

just quick update, have tried building project without development build selected in build settings , send link of people in google community in order give shot. still has same error testing device does.

9/11/15

after trying few things tony pointed out, have noticed onbillingsupported() function not called when use this: storeevents.onbillingsupported += onbillingsupported; i'm not sure why yet.

9/12/15

after going through tutorial on soomla site, have done said except starting iab in background , fraud protection since aren't required. onbillingsupported method still not called , still getting same error before on android devices.

9/12/15

i removed soomla plugin , imported newest version , followed instructions again , still same error.

9/16/15

really no idea missing here. after removing of soomla plugin , adding again , still getting same error after multiple tries. have followed tutorial says , have of code above.

i have never had problem describe. created private google+ community though, , added community testers. shifted app beta. , invited people private community there link download app , test it. easy.

the second point, code above. fetching 4 goods , 3 currency packs code not reflect that. maybe you pasted half class.

finally, see if thread help: http://answers.soom.la/t/solved-some-clarification-about-iab-testing/2067/8

by way, soomla have dedicated site answers.soom.la soomla related issues.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -