Search Unity

Question APP rejected for iap

Discussion in 'Unity IAP' started by Alexbuy, Nov 22, 2022.

  1. Alexbuy

    Alexbuy

    Joined:
    May 22, 2019
    Posts:
    4
    Next Steps


    When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead.


    Resources


    - Learn how to set up and test in-app purchase products in the sandbox environment.

    - For more information on receipt validation, see the In-App Purchase FAQ.

    - If your app makes a SKReceiptRefreshRequest call and fails, do not retry the call. Assume the user does not have access. Continue by making the addPayment call.

    - If your app makes a SKReceiptRefreshRequest call to restore previously purchased in-app purchases, make sure the app calls restoreCompletedTransactions when the user selects the "Restore" button.

    Please see attached screenshot for details. Request a phone call from App Review


    At your request, we can arrange for an Apple Representative to call you within the next three to five business days to discuss your App Review issue.





    ______________



    Hi guys, I am facing this problem with iap, in the editor everything works great but on testflight not at all.
    p.s. everything in the editor and on apple developer is set corectly.
    here are the codes:


    _________________________ 1

    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using UnityEngine.UI;
    6. public class Shop : DialogBase
    7. {
    8.     [SerializeField] private DiamondPack[] DiamondPacks;
    9.     [SerializeField] private CoinPack[]    CoinPacks;
    10.     [SerializeField] private RemoveAdsPack remove_ads_pack;
    11.     public override void Init ()
    12.     {
    13.         base.Init ();
    14.      
    15.         InitShopDiamond ();
    16.         InitCoinPack ();
    17.         InitRemoveAds ();
    18.     }
    19.     private void InitRemoveAds ()
    20.     {
    21.         remove_ads_pack.Init ();
    22.         remove_ads_pack.RefreshPrice ();
    23.     }
    24.  
    25.     private void InitShopDiamond ()
    26.     {
    27.         for (int i = 0; i < DiamondPacks.Length; i++)
    28.         {
    29.             DiamondPacks[i].Init ();
    30.             DiamondPacks[i].RefreshPrice ();
    31.         }
    32.     }
    33.     private void InitCoinPack ()
    34.     {
    35.         for (int i = 0; i < CoinPacks.Length; i++)
    36.         {
    37.             CoinPacks[i].Init ();
    38.             CoinPacks[i].RefreshEarn ();
    39.         }
    40.     }
    41.     public override void Enable ()
    42.     {
    43.        base.Enable ();
    44.  
    45.         for (int i = 0; i < DiamondPacks.Length; i++)
    46.         {
    47.             DiamondPacks[i].RefreshPrice ();
    48.         }
    49.         for (int i = 0; i < CoinPacks.Length; i++)
    50.         {
    51.             CoinPacks[i].RefreshEarn ();
    52.         }
    53.      
    54.         remove_ads_pack.RefreshPrice ();
    55.     }
    56.  
    57.     #region Interact
    58.     public void InteractClose ()
    59.     {
    60.         DialogExtension.DisableDialog (DialogEnum.DialogId.Shop);
    61.      
    62.         SoundManagerExtension.PlayAudioSound (AudioEnums.SoundId.Fx_Touch_Button);
    63.     }
    64.  
    65.     #endregion
    66. }

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.UI;
    5. public class Shop : DialogBase
    6. {
    7.     [SerializeField] private DiamondPack[] DiamondPacks;
    8.     [SerializeField] private CoinPack[]    CoinPacks;
    9.     [SerializeField] private RemoveAdsPack remove_ads_pack;
    10.     public override void Init ()
    11.     {
    12.         base.Init ();
    13.      
    14.         InitShopDiamond ();
    15.         InitCoinPack ();
    16.         InitRemoveAds ();
    17.     }
    18.     private void InitRemoveAds ()
    19.     {
    20.         remove_ads_pack.Init ();
    21.         remove_ads_pack.RefreshPrice ();
    22.     }
    23.  
    24.     private void InitShopDiamond ()
    25.     {
    26.         for (int i = 0; i < DiamondPacks.Length; i++)
    27.         {
    28.             DiamondPacks[i].Init ();
    29.             DiamondPacks[i].RefreshPrice ();
    30.         }
    31.     }
    32.     private void InitCoinPack ()
    33.     {
    34.         for (int i = 0; i < CoinPacks.Length; i++)
    35.         {
    36.             CoinPacks[i].Init ();
    37.             CoinPacks[i].RefreshEarn ();
    38.         }
    39.     }
    40.     public override void Enable ()
    41.     {
    42.        base.Enable ();
    43.  
    44.         for (int i = 0; i < DiamondPacks.Length; i++)
    45.         {
    46.             DiamondPacks[i].RefreshPrice ();
    47.         }
    48.         for (int i = 0; i < CoinPacks.Length; i++)
    49.         {
    50.             CoinPacks[i].RefreshEarn ();
    51.         }
    52.      
    53.         remove_ads_pack.RefreshPrice ();
    54.     }
    55.  
    56.     #region Interact
    57.     public void InteractClose ()
    58.     {
    59.         DialogExtension.DisableDialog (DialogEnum.DialogId.Shop);
    60.      
    61.         SoundManagerExtension.PlayAudioSound (AudioEnums.SoundId.Fx_Touch_Button);
    62.     }
    63.  
    64.     #endregion
    65. }
     
  2. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626