Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

When Validate In-App Receipt, Returns Wrong in_app list

Discussion in 'Unity IAP' started by Tommy-Yuan, Sep 13, 2018.

  1. Tommy-Yuan

    Tommy-Yuan

    Joined:
    Aug 1, 2017
    Posts:
    3
    When I try to validate our IOS app's in-app purchase receipt of an unconsumable product in sandbox, usually it returns all the unconsumable product which I have brought before. But since several days ago, it returns wrong in_app list of unconsumable product to me.



    Here's how I meet this issue:



    I brought a unconsumable product which I have brought before, and the Client tells me 'You have brought this item before, Would you like to restore it?' . When I click yes, it send my receipt to apple server, it response a list of only 2 items in in_app list which not contains the item i just restored. (I have brought more than 10 before).



    I am using the same apple id to do the test, and same bundle id too.



    here is one of my receipt:

    MIIVOwYJKoZIhvcNAQcCoIIVLDCCFSgCAQExCzAJBgUrDgMCGgUAMIIE3AYJKoZIhvcNAQcBoIIEzQSCBMkxggTFMAoCAQgCAQEEAhYAMAoCARQCAQEEAgwAMAsCAQECAQEEAwIBADALAgELAgEBBAMCAQAwCwIBDwIBAQQDAgEAMAsCARACAQEEAwIBADALAgEZAgEBBAMCAQMwDAIBCgIBAQQEFgI0KzAMAgEOAgEBBAQCAgCfMA0CAQ0CAQEEBQIDAa7dMA0CARMCAQEEBQwDMS4wMA4CAQkCAQEEBgIEUDI1MDARAgEDAgEBBAkMBzE4MDkxMzEwGAIBBAIBAgQQENGKk9+lEMuCxOyjEfHzrjAbAgEAAgEBBBMMEVByb2R1Y3Rpb25TYW5kYm94MBwCAQUCAQEEFKq4wV1/NrKm7wCY3pfsJ6AbrhRZMB4CAQwCAQEEFhYUMjAxOC0wO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FKw4DAhoFADANBgkqhkiG9w0BAQEFAASCAQCdaDi+3I/tVJjr5epwsytWPBwhhXsx6A+FYxLVkRA8NfmGsexz47oAku4A91kU2J+0GBr+kLrkQVAvl1jcTxlibyICw57in4oquV7c0w78lkgzgcCU+pEu6rGQimsRUREc0stMsLlRrv0D+tCA1zq1GTJMycJC2t3kEPhwlFjN9RFB/bNLCAF9+Ze78bHkGwUzv2DDnGHKV4g53lJ5g5JAO8qfSgNYBhjZKF/UfeRivHxLIBkht1fMjbYasTcbbSFlBQqsjan5MTOVE0q36pDXm5SSiR0FFwuy5w+b4SBobhiRxhpUqE3pBbCh6z17zKbU8TvS0P0IT6tGvm0NYm34



    and here is the apple sandbox validation response:



    {
    "error": null,
    "response": {
    "receipt": {
    "receipt_type": "ProductionSandbox",
    "adam_id": 0,
    "app_item_id": 0,
    "bundle_id": "com.linkjoy.littlesailor.drake",
    "application_version": "1809131",
    "download_id": 0,
    "version_external_identifier": 0,
    "receipt_creation_date": "2018-09-13 07:32:26 Etc/GMT",
    "receipt_creation_date_ms": "1536823946000",
    "receipt_creation_date_pst": "2018-09-13 00:32:26 America/Los_Angeles",
    "request_date": "2018-09-13 07:47:39 Etc/GMT",
    "request_date_ms": "1536824859693",
    "request_date_pst": "2018-09-13 00:47:39 America/Los_Angeles",
    "original_purchase_date": "2013-08-01 07:00:00 Etc/GMT",
    "original_purchase_date_ms": "1375340400000",
    "original_purchase_date_pst": "2013-08-01 00:00:00 America/Los_Angeles",
    "original_application_version": "1.0",
    "in_app": [
    {
    "quantity": "1",
    "product_id": "ItemDrakeCardBag",
    "transaction_id": "1000000436872063",
    "original_transaction_id": "1000000436872063",
    "purchase_date": "2018-08-29 09:38:37 Etc/GMT",
    "purchase_date_ms": "1535535517000",
    "purchase_date_pst": "2018-08-29 02:38:37 America/Los_Angeles",
    "original_purchase_date": "2018-08-29 09:38:37 Etc/GMT",
    "original_purchase_date_ms": "1535535517000",
    "original_purchase_date_pst": "2018-08-29 02:38:37 America/Los_Angeles",
    "is_trial_period": "false"
    },
    {
    "quantity": "1",
    "product_id": "ItemDrakeProShipA",
    "transaction_id": "1000000410341820",
    "original_transaction_id": "1000000410341820",
    "purchase_date": "2018-06-23 09:38:36 Etc/GMT",
    "purchase_date_ms": "1529746716000",
    "purchase_date_pst": "2018-06-23 02:38:36 America/Los_Angeles",
    "original_purchase_date": "2018-06-23 09:38:36 Etc/GMT",
    "original_purchase_date_ms": "1529746716000",
    "original_purchase_date_pst": "2018-06-23 02:38:36 America/Los_Angeles",
    "is_trial_period": "false"
    }
    ]
    },
    "status": 0,
    "environment": "Sandbox",
    "service": "apple"
    },
    "purchaseData": [
    {
    "quantity": 1,
    "productId": "ItemDrakeCardBag",
    "transactionId": "1000000436872063",
    "originalTransactionId": "1000000436872063",
    "purchaseDate": "2018-08-29 09:38:37 Etc/GMT",
    "purchaseDateMs": 1535535517000,
    "purchaseDatePst": "2018-08-29 02:38:37 America/Los_Angeles",
    "originalPurchaseDate": "2018-08-29 09:38:37 Etc/GMT",
    "originalPurchaseDateMs": 1535535517000,
    "originalPurchaseDatePst": "2018-08-29 02:38:37 America/Los_Angeles",
    "isTrialPeriod": "false",
    "isTrial": false,
    "bundleId": "com.linkjoy.littlesailor.drake",
    "expirationDate": 0
    },
    {
    "quantity": 1,
    "productId": "ItemDrakeProShipA",
    "transactionId": "1000000410341820",
    "originalTransactionId": "1000000410341820",
    "purchaseDate": "2018-06-23 09:38:36 Etc/GMT",
    "purchaseDateMs": 1529746716000,
    "purchaseDatePst": "2018-06-23 02:38:36 America/Los_Angeles",
    "originalPurchaseDate": "2018-06-23 09:38:36 Etc/GMT",
    "originalPurchaseDateMs": 1529746716000,
    "originalPurchaseDatePst": "2018-06-23 02:38:36 America/Los_Angeles",
    "isTrialPeriod": "false",
    "isTrial": false,
    "bundleId": "com.linkjoy.littlesailor.drake",
    "expirationDate": 0
    }
    ]
    }








    It tells this receipt was created 2018-9-13, so it's a new receipt, but what I am buying is productId: ItemDrakePass.



    Is this something wrong when Unity IAP fetching the Apple receipt

    or I make any mistake in my code?



    Thank you.



    Tommy
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,213
    What changed in your app since several days ago?
     
  3. Tommy-Yuan

    Tommy-Yuan

    Joined:
    Aug 1, 2017
    Posts:
    3
    We added one new Item to the store, using .AddProduct() in our code, and added in iTunesConnect too.
     
    Last edited: Sep 14, 2018
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,213
    Does it work if you remove the new product, as a test? Please provide exact steps to reproduce.
     
  5. Tommy-Yuan

    Tommy-Yuan

    Joined:
    Aug 1, 2017
    Posts:
    3
    I tried to using the old shop config, i seems still not working. Turns out in Apple Server my in_app list has changed.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,213
    Please provide the requested information and and we could continue to investigate. Please test on a different device, or log onto this device with a different account.