Need help with IOS IAP

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JustJustin000

I have been trying to implement one non-consumable IAP into my IOS game and I just cannot get it working.

I can successfully call request_product_info({"product_ids": [""]}) and it returns ‘1’ and ‘adding to product list’

But when I try to call payment.purchase({ "product_id": ""}) it returns ‘31’. What does that mean? Am I entering the parameters wrong? If anyone has a working script, it would mean the world to me if you shared it.

The only places that I have found information about IOS IAPs:

App store plugin script example:

Official docs: Plugins for iOS — Godot Engine (stable) documentation in English

Reddit post: Reddit - Dive into anything

I have read through these pages multiple times and I still don’t quite understand why my script isnt working.
Here is my script: -

I have the In App Store plugin installed and checked, I have created an IAP in app store connect, I have my bank and tax info filled out in app store connect. I have been exporting my game with ‘export with debug’ unticked, and In Xcode signed as Apple Development. I am testing it by plugging my iPad into my mac and building my game to it. I am using godot version 3.4.4. Any help is greatly appreciated.