Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by TotalPixel · Jan 26, 2017 at 10:10 AM · unity 5in app purchase

Codeless IAP not working on phone

Hi all,

Ive been trying to get the codeless IAP working on my current project, ive got it all working fine in the editor, setup the products on the google play developer console, checked the ID's match, added my developer email for testing, etc but I cant get anything to happen when you click the buy button in game on an android device.

Im using the latest unity build and have updated all my SDK's to the latest.

Any suggestions would be greatly appreciated.

Thanks.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TotalPixel · Jan 26, 2017 at 12:13 PM 0
Share

I have been searching more for a solution and cant find anywhere using the codeless IAP system that asks for the google public key, could this be the issue and does anyone know how you set it using the codeless IAP?.

Thanks

avatar image alexchandriyaa TotalPixel · Dec 12, 2017 at 12:07 PM 0
Share

no that is not issue for me also it asks for google public key in the editor that is only for revenue details

avatar image rogaroga · Jan 26, 2017 at 07:28 PM 0
Share

I'm having this same problem. Hope you get an answer from someone. Are you also seeing this issue that I'm having with Codeless IAP in the editor: LIN$$anonymous$$

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by rogaroga · Jan 27, 2017 at 03:22 AM

Is the problem that you are testing from the same google account as publisher's account? Found this as I have the same issue:

"NOTE: A restriction against using the publisher’s Google Account for testing exists, because Google payments does not let you buy items from yourself. Therefore you will need to create a non-publisher Google Account for testing."

SOURCE: https://docs.unity3d.com/Manual/UnityIAPGoogleConfiguration.html

EDIT: In case someone does come by this thread, I found the solution to my problem, and what may be the original posters problem. The symptom was IAP buttons in editor working in so far as they activated the Fake Store, but then those same buttons doing absolutely nothing when clicked in game after building the project (in my case to android). I found that in my purchase handling script my references were not correct. I failed to specifically identify the GooglePlay store ID. My working code ended up looking like this:

     public static string Coins150 = "150coins";
         public static string Coins900 = "900coins";
         public static string Coins2000 = "2000coins";
         public static string Coins5000 = "5000coins";
         public static string Coins30000 = "30000coins";
 
         // Apple App Store-specific product identifier.
 
         // Google Play Store-specific product identifier.
         private static string kProductNameGooglePlayCoins150 = "150coins";
         private static string kProductNameGooglePlayCoins900 = "900coins";
         private static string kProductNameGooglePlayCoins2000 = "2000coins";
         private static string kProductNameGooglePlayCoins5000 = "5000coins";
         private static string kProductNameGooglePlayCoins30000 = "30000coins";
 
         void Start()
         {
             // If we haven't set up the Unity Purchasing reference
             if (m_StoreController == null)
             {
                 // Begin to configure our connection to Purchasing
                 InitializePurchasing();
             }
         }
 
         public void InitializePurchasing() 
         {
             // If we have already connected to Purchasing ...
             if (IsInitialized())
             {
                 // ... we are done here.
                 return;
             }
 
             // Create a builder, first passing in a suite of Unity provided stores.
             var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
 
             // Add a product to sell / restore by way of its identifier, associating the general identifier
             // with its store-specific identifiers.
             builder.AddProduct(Coins150, ProductType.Consumable, new IDs(){ {kProductNameGooglePlayCoins150, GooglePlay.Name} });
             builder.AddProduct(Coins900, ProductType.Consumable, new IDs(){ {kProductNameGooglePlayCoins900, GooglePlay.Name} });
             builder.AddProduct(Coins2000, ProductType.Consumable, new IDs(){ {kProductNameGooglePlayCoins2000, GooglePlay.Name} });
             builder.AddProduct(Coins5000, ProductType.Consumable, new IDs(){ {kProductNameGooglePlayCoins5000, GooglePlay.Name} });
             builder.AddProduct(Coins30000, ProductType.Consumable, new IDs(){ {kProductNameGooglePlayCoins30000, GooglePlay.Name} });

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image alexchandriyaa · Dec 12, 2017 at 12:05 PM 0
Share

i have the same issue and tried with your code suggestion but not yet working @rogaroga

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

91 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

In Unity Services, can Managers in an organisation integrate IAP or do they need to be Owners ? 0 Answers

UnityIAP not restoring purchases on Android 1 Answer

Simple IAP System (SIS) Call back is not working (HandleSuccessfulPurchase is not called) 0 Answers

Unity IAP iOS sign in issue. Asking for Apple ID, but not allowing user to do so 1 Answer

UnityIAP 2019.1.4f1 Fix? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges