Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Is a google merchant account required for testing apps on g-play?

Discussion in 'Scripting' started by DoomDude99, Sep 23, 2019.

  1. DoomDude99

    DoomDude99

    Joined:
    May 11, 2019
    Posts:
    87
    Like the title says, is a merchant account mandatory for testing the IAP logic of an app. The app has a set of fixed items a user can permanently purchase. These items must be added to the In-app section of the g-play console (I'm following the README from:

    https://github.com/googlesamples/android-play-billing

    Code (CSharp):
    1.  
    2. This sample can't be run as-is. You have to create your own
    3. application instance in the Developer Console and modify this
    4. sample to point to it. Here is what you must do:
    5.  
    6. ON THE GOOGLE PLAY DEVELOPER CONSOLE
    7.  
    8. 1. Create an application on the Developer Console, available at
    9.   https://play.google.com/apps/publish/.
    10.  
    11. 2. Copy the application's public key (a base-64 string). You can find this in
    12.    the "Services & APIs" section under "Licensing & In-App Billing".
    13.  
    14. IN THE CODE
    15.  
    16. 3. Open MainActivity.java, find the declaration of base64EncodedPublicKey and
    17.    replace the placeholder value with the public key you retrieved in Step 2.
    18.  
    19. 4. Change the sample's package name to your package name. To do that, update the
    20.   package name in AndroidManifest.xml and correct the references (especially the
    21.   references to the R object).
    22.  
    23. 5. Export an APK, signing it with your PRODUCTION (not debug) developer certificate.
    24.  
    25. BACK TO THE GOOGLE PLAY DEVELOPER CONSOLE
    26.  
    27. 6. Upload your APK to Google Play for Alpha Testing.
    28.  
    29. 7. Make sure to add your test account (the one you will use to test purchases)
    30.   to the "testers" section of your app. Your test account CANNOT BE THE SAME AS
    31.   THE PUBLISHER ACCOUNT. If it is, your purchases won't go through.
    32.  
    33. 8. Under In-app Products, create MANAGED in-app items with these IDs:
    34.        premium, gas
    35.    Set their prices to 1 dollar. You can choose a different price if you like.
    36.  
    37. 9. Under In-app Products, create SUBSCRIPTION items with these IDs:
    38.        infinite_gas_monthly, infinite_gas_yearly
    39.    Set their prices to 1 dollar and the billing recurrence to monthly for
    40.    infinite_gas_monthly and yearly for infinite_gas_yearly. To prevent being charged
    41.    while testing, set the trial period to 7 days.
    42.  
    43. 10. Publish your APK to the Alpha channel. Wait 2-3 hours for Google Play to process the APK
    44.    If you don't wait for Google Play to process the APK, you might see errors where Google Play
    45.   says that "this version of the application is not enabled for in-app billing" or something
    46.   similar. Ensure that the In-App products move to the "Active" state within the console before
    47.   testing.
    48.  
    49. TEST THE CODE
    50.  
    51. 11. Install the APK signed with your PRODUCTION certificate, to a
    52. test device [*].
    53. 12. Run the app.
    54. 13. Make purchases using the test account you added in Step 7.
    55.  
    56.  
    Upon creating a managed item, I get the following message:

    Code (CSharp):
    1. Your app doesn't have any in-app products yet.
    2.  
    3. To add in-app products, you need to set up a Google Payments merchant account.
    4. Set up a merchant account
    Is there any fee required (either one time payment or subscription) require for creating a merchant account? I did not find anything related in google's tos.
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,385
    You should have a 'developer account' setup up through the 'google play console'. In your developer console you can setup test merchant accounts to use.
     
    DoomDude99 likes this.
  3. DoomDude99

    DoomDude99

    Joined:
    May 11, 2019
    Posts:
    87
    Where is the respective setting? All options for my app which is released as a closed, free, alpha, require setting up a merchant account.

    There doesn't seem to be a (functionally distinct) merchant account:

    https://developers.google.com/shopping-content/v2/how-tos/testing
     
  4. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,385
    DoomDude99 likes this.
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    DoomDude99 likes this.