Reputation: 16588
I have signed out from the store in device settings. I entered user credentials only in my App. I have set up a brand new (actually around 4 times) test user.
Why this message keep poppin' up?
Is it something connected to iOS 5, automatic app sync, or iCloud?
Upvotes: 17
Views: 21344
Reputation: 1089
Swift 3
Insert this temporary code somewhere in your project:
for transaction: AnyObject in SKPaymentQueue.default().transactions {
guard let currentTransaction: SKPaymentTransaction = transaction as? SKPaymentTransaction else {return}
SKPaymentQueue.default().finishTransaction(transaction as! SKPaymentTransaction)
}
This clears out the payment queue. Make sure to run it much later than viewDidLoad if you can. I made mine triggered by a button. Ran it a couple times, then removed the code. No more annoying verification pop-ups.
Upvotes: 1
Reputation: 882
In addition of the above answers, note the below points also :-
1) Uninstall your app from the device.
2) Create a new test account on iTunes Connect and verify its email address. Never add any payment information for this test account, not online, not on iTunes, not on your device. Doing so might invalidate your test account (and trigger the "verify payment info" vicious cycle.) Also never use this test account out of the Sandbox.
3) Log-out from the App Store on your device. DO NOT log back in the App Store via Settings > iTunes & App Stores on your device. You will be asked your login credentials from your app later (see points 5-6)
4) Re-install your app.
5) Attempt an in-app purchase. You should now be prompted to enter both your username and password (as you logged out from the App Store)
6) Type in your username and password: you should not see the dreadful "Verification Required: before you can make purchases, you must verify your payment info" message and the purchase should be successful.
Upvotes: 2
Reputation: 241
If you are having such problem for 4th IAP item to buy.
It looks, each test account does not work for purchasing more than 3 items of an application. You may create a new test account from itunesconnect.apple.com->Manage Users->Test User to test your 4th IAP item.
Upvotes: 0
Reputation: 176
I've dealing with this problem for about one week, trying to use accounts in US/Canada without any success. Finally I found this post and it works: http://iphonedevsdk.com/forum/iphone-sdk-development/63008-in-app-purchase-test-account-verification-required-cant-get-passed.html You need a test account that NEVER has a credit card attached to it, NEVER is logged into itunes store or app store via device, and if you do login to itunes or agree to any app store stuff it voids the test account and will never work again.
So, To test your In App Purchase app, you need to use a new account that does not have a credit card. logout of the store, and only use your new account inside the app you are testing.
Update: After a long time system maintenance of iTunes in Sept 2013, only test accounts in US can make test purchases.
Upvotes: 11
Reputation: 5507
Register a fresh test user for the USA. You can put any email address.
Log out under settings. Delete the app. start it again via xCode login with your new user within the app.
It may say that you are not located in the USA and it opens the browser, Close the browser and start it again.
It should work now.
Upvotes: 0
Reputation: 31
I have struggled with this myself, i finally found a workaround that worked for me...
Hope this works...
Upvotes: 3
Reputation: 1819
I was facing same problem after spending several hours i figured out that county/region of your itunes connect test account and your device/simulator must be same.
Please verify it as it solved my problem
Upvotes: 0
Reputation: 423
I had exactly same problem with sandbox in-app purchases, in built-in model (no receipt verification), app received valid products, now i called addPayment, everything alright. But now "Verification required" appeared and payment was canceled.
After hours of pain I discovered, my problem was in test account.. i created test account for Czech Republic iTunes store... and that was the reason of fail. Dumb. I tried to create Canadian test user and it suddenly worked! "Verification required" will no longer appeared.
Upvotes: 16
Reputation: 25
Even in sandbox, you need to complete the buy verifying the receipt to the server. It corresponds to steps 6-7-8 of built-in model and 11-12-13 of the server model.
All you need to do is:
Retrieve the receipt data from the transaction’s transactionReceipt property and encode it using base64 encoding.create a json like this:
{
"receipt-data" : "(receipt in base 64 encoding)"
}
Make a post to verification URL for production:
https://buy.itunes.apple.com/verifyReceipt
For sandbox :
https://sandbox.itunes.apple.com/verifyReceipt
The response is like this:
{
"status" : 0,
"receipt" : { ... }
}
If the value of the status key is 0
, this is a valid receipt.
If the value is anything other than 0
, this receipt is invalid.
For further information look the guide: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/VerifyingStoreReceipts/VerifyingStoreReceipts.html
Upvotes: 1
Reputation: 2425
I saw this issue after iOS5 got released.
Earlier I used to create test accounts with dummy email addresses and it used to work well for me, but post iOS5, it started showing verification required for test accounts.
Thus I ended up using actual email addresses for the test accounts and verified when asked for, which seemed to do the trick for me.
Upvotes: 0