简体   繁体   中英

Google authentication ERROR while trying to purchase with soomla iap

need a little help. Im making an android app and integrated Soomla for a simple "No ads" purchase inside my app. Ive a purchase button which should do the actual purchase via google.

What occurs is a popup from google : "Error authentication needed, You have to login in your google account" .

I think its a small problem, but i dont get what. I am logged in in my google account. Store in Soomla is running ( at least it says so). ive enable test purchase.Im using my phone for the purchase ofc. What i am missing?

public class NoADsButton : MonoBehaviour {
        private static bool storeInitialized = false; // prevent store to be initialized twice

    void Start () {
        if(storeInitialized)            return;
        SoomlaHighway.Initialize();
        StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized;
        SoomlaStore.Initialize(new SoomlaAssets());
    }

    public void onSoomlaStoreInitialized() {
        storeInitialized = true;
    }

    public void OnMouseDown(){
           StoreInventory.BuyItem("no_ads");
    }

And the item ive done as its shown in the soomla example:

public const string NO_ADDS_PRODUCT_ID = "no_ads"; 

public static VirtualGood NO_ADS_LTVG = new LifetimeVG(
    "No Ads", // name
    "No More Ads!", // description
    "no_ads", // item id
    new PurchaseWithMarket(NO_ADDS_PRODUCT_ID, 0.99)); // the way this virtual good is purchased


}

This usually happens when the process of publishing the app for testing wasn't done properly. Try going carefully over Google's instructions, make sure you didn't miss anything. http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test

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