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

IAP purchase fails on some iPad and not on others.

Discussion in 'Unity IAP' started by MobileGamesPro, Jan 29, 2020.

  1. MobileGamesPro

    MobileGamesPro

    Joined:
    Nov 4, 2018
    Posts:
    11
    Some players are writing to me that Apple has charged them for the in app purchase but it is not activated. One has even made a video: it puts its user to pay, but the iOS pop up does not come out "the purchase is completed successfully".
    In my iPhone and iPad always going well, and many other users going well too, because they are sending records at the payment missions in Game Center.

    My client has an iPad Pro 2nd gen with iOS 13.3.
    In my iPad Air 2 and iPhone 7 plus I also have iOS 13.3 and it's going well.

    I am using IAP Button.
    Yesterday I updated to see if the latest version of IAP fixed it, but the client says that it still does not work and that he will put a negative review.

    My game is this:
    https://apps.apple.com/app/id1485704096

    What could be failing?
    Thank you.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    The dialog that you refer to is a system dialog that we have no control over. Are you able to reproduce? From your description, it sounds like it happens every time for the user, so should be reproducible. It may be an issue with that version of the iPad, but would need to confirm. Is is only this user having problems? If not, please try to find what the users have in common.
     
  3. MobileGamesPro

    MobileGamesPro

    Joined:
    Nov 4, 2018
    Posts:
    11
    Thank you very much for the reply. I am asking the device to those who have written to me. The iPad Pro 2nd gen client has told me that it has been jailbroken, could that be the cause?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I would say yes, but look for reports from others.
     
  5. MobileGamesPro

    MobileGamesPro

    Joined:
    Nov 4, 2018
    Posts:
    11
    The other user who wrote me with the problem has an iPhone 6S with iOS 13.3.1 and has not jailbroken.
    A third user wrote a review with the problem but I don't have his email.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you using an IAP Listener in your game? Can you share a screenshot of your IAP Button properties in the Inspector, and also the code that you call for a successful purchase and a failed purchase?
     
  7. MobileGamesPro

    MobileGamesPro

    Joined:
    Nov 4, 2018
    Posts:
    11



    And the code in AllMissionsEnabled is very simple:

    public void AllMissionsEnabled()
    {
    MainClass.GetComponent<MainClass>().BuyAllMissions = 1;
    MainClass.GetComponent<MainClass>().SaveData();

    Debug.Log("All missions enabled");
    }


    For a failed purchase I did not put code, I should have put something, could give me a hint.

    I am not using IAP Listener, just the Codeless button.

    It's a non-consumable purchase, I don't know if I have to check the "Consume purchase" box.

    Thank you very much for the help.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    And I trust you've tested all your product purchases yourself, in TestFlight and with an actual credit card. You are not handling the Purchase Failed case, you'll want to make sure to do that, just alert the user that there is a problem with the purchase and it didn't go through. And you'll want to ensure you are using a Listener if your IAP button is not on your first/opening scene. However, I might recommend instead that you consider Scripted IAP instead of Codeless IAP, it's much more flexible, and you don't need a Listener. In some ways, it's easier than Codeless. There is an example of both types here, the second one is Codeless and has a Listener. https://forum.unity.com/threads/sample-iap-project.529555/ and more info on IAP on iOS here https://docs.unity3d.com/Manual/UnityIAPAppleConfiguration.html
     
    MobileGamesPro likes this.
  9. MobileGamesPro

    MobileGamesPro

    Joined:
    Nov 4, 2018
    Posts:
    11
    Finally I used Scripted IAP instead of Codeless IAP and the problem has been fixed, two of the customers have changed their rating from 1 star to 5 stars. Many thanks.