If you see the following error while testing your payment in the iOS simulator-
Error while paying - Your purchase will be active once it's validated by your bank. If you have any issues, do restore the purchase.
In general, payments are not available on the simulator with iOS. It is recommended that you compile the device to test the entire payment workflow. In-App Purchases go through the App Store of your device to make the payment etc., but the simulator doesn't have the App Store so you can't make payments. You can still "simulate" payments by using a configuration file in your project, but this will never really replace a test on the device (https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode). You don't have to use TestFlight. It's a good idea to compile directly on a device.