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. Dismiss Notice

IAP purchasedProduct.transactionID wrong

Discussion in 'Unity IAP' started by parkdr, Nov 27, 2020.

  1. parkdr

    parkdr

    Joined:
    Jul 12, 2018
    Posts:
    3
    After update 2.2.1 / 2.2.2, I have problem purchasedProduct.transactionID value is /jdhmnmpfoejkiejhpanlfjgm.AO-J1OzVAomazbkgLk2Nh_Ev63uASRWBzXaYY09OnUTnKqF710h499Vn_4HcJUvt2g_dQS28N1sRLisSJ3_EAeKWHKGKiQ-66I.....'

    On 2.2.0, I had purchasedProduct.transactionID value is GPA.0000-0000...
     
  2. Tankzo

    Tankzo

    Joined:
    Jul 16, 2019
    Posts:
    16
    The transactionID is "purchase token" from the play console (the long string)
    and
    The Order ID is the "GPA.xxxx" string.

    You can get both if you pull m_StoreController.products.WithID(id).receipt (you get the WHOLE receipt and it is broken down in the JSON of the receipt) (See below).

    I have not found a way to pull the "Order ID" (The GPA.xxxx) out without pulling the whole receipt and then doing a string search for it.

    {"Store":"GooglePlay","TransactionID":"<long string>","Payload":"{\"json\":\"{\\\"orderId\\\":\\\"GPA.xxxx\\\",\\\"packageName\\\":\\\"com.<package name>\\\",\\\"productId\\\":\\\"<Store product name>\\\",\\\"purchaseTime\\\":1606362492598,\\\"purchaseState\\\":0,\\\"purchaseToken\\\":\\\"<long string again>\\\",\\\"acknowledged\\\":true}\",\"signature\":\"<signature string>\",\"skuDetails\":\"{\\\"productId\\\":\\\"<Product ID>\\\",\\\"type\\\":\\\"inapp\\\",\\\"price\\\":\\\"$1.99\\\",\\\"price_amount_micros\\\":1990000,\\\"price_currency_code\\\":\\\"USD\\\",\\\"title\\\":\\\"<Store Title>\\\",\\\"description\\\":\\\"<store description>\\\",\\\"skuDetailsToken\\\":\\\"<store sku token string>\\\"}\"}"}
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please review the recent IAP release notes around this issue, Google has not been consistent in their TransactionID handling.
     
    Tankzo likes this.