I am building an iOS app and trying to implement an in app purchase (non-consumable).

All the bundle IDs etc. are set up and working, and I can see my product as valid when I fetch the Apple Store servers. However, while testing, I am getting failed transactions at the paymentQueue callback.

Here is what happens in the iOS simulator step by step:

A message box asks "would you like to buy .. for $0.99?" which is correct

I click Yes.

After about a second it says that I've already bought it (correct, I test-bought it initially while debugging). I click OK.

It complains about a login requirement (it says something like MZFinance_LoginRequired, I think its a missing string identifier.) I click OK.

App Store login box pops up and I enter my test account credentials.

My breakpoint in Xcode is hit, with the transaction state SKPaymentTransactionStateFailed.