Search Unity

Attach playerID (string) to every IAP in Android

Discussion in 'Unity IAP' started by Alkanov, Sep 26, 2018.

  1. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    54
    Lately I am having many issues with my server side IAP verification system which can lead to some players buying stuff and not getting anything till I check the logs or they contact me.

    Once they contact me I have to get back to them asking them for their GPA# and player username, and only then is when I can match a product bought with their accounts... this is painful..

    I was googling how to attach a playerID to each IAP and found this "getBuyIntentExtraParams()" but I have no clue if this is implemented on Unity's API at all nor I can find any information regarding this.

    Does anyone here knows how to do this? Thanks
     
  2. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    54
    Hi,

    How is this a violation of privacy if google recommends it? https://developer.android.com/google/play/billing/billing_reference

    Code (CSharp):
    1. Note: Instead of using this method, we recommend that you use getBuyIntentExtraParams(), which provides additional functionality.
    The common factor I've seen on failed purchases is when purchases take longer than 5 mins to be "chargeable" I will solve this, but I would still like to know who bought what for a better customer support experience instead of making the process a 3 step one (customer: I have an issue..-->customer support: sure, give me your GPA#--->Customer: whats a GPA number? ---> Customer support: the one in your email---->oh here GPA3223232--->...and your username???--->Oh here....---> done..)
     
  3. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    54
    The issue can be solved by queuing a re-check with google for those orders that are not yet "chargeable" (server side), but the reason why I came here is because according to google, we could attach a hashed string to each order, please see below my Ctrl+F



    I now know this is not supported by Unity's IAP API.
     
  4. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    54
    Hi Jeff,

    I understand it would be a violation of GDPR if my playerID were to be something like "John-Dunne-mobile#333222333" but a hashed string is not in any way pointing towards any personal information, also, once the buying process is confirmed, I know who user is who anyway. All I want is to be able to also know who are the ones failing or cancelled (cause I also have tons of Payment Declined orders)

    "Can you find anything in common in the reports?" - The Unity side of things works fine but the user is charged up to 10 mins after they initiated the purchase, this has happened very very few times but I have a user that has a 100% fail rate. It might be his payment method that takes too long to be chargeable, but in the end he is charged.

    "Android version, etc?" - Based on the above I dont think this is relevant but he is on 8.0

    "Are you able to reproduce using a report of the products purchased, and in the same transaction order?" - I have not been able to reproduce this issue. But I'm sure that the common factor on all the failed transactions is that the time between "Payment pending" and "Chargeable" is above 5 minutes

    "Are you able to obtain the device logs?" - I don't know how to do this with live apps (not in development mode)

    And again, the issue relies on the way I am verifying orders on the server. I do not use Unity API to verify orders, but once I get a Purchase Token, I send it to my server and verify it with google via REST API. I guess if the order takes 5 mins to charge, the client could close the game or maybe Unity's API is not triggering the "success" callback... but this happens once every 500 orders so I'm not really eager to spend too much time figuring this out