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?
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.
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.
I have struggled with this myself, i finally found a workaround that worked for me...
On the device Log out of iTunes account in settings (also hard close settings and iTunes if you have them open as a precaution)
Delete app
Create a new test user at “itunesconnect.apple.com” – selecting the United States as your store
Reinstall app
Try to make a purchase in the app
Enter you new test user account details
If a pop up states that it needs to swap stores, immediately press home. DO NOT press OK.
Relaunch the app, and try again. It should now work as expected.
Hope this works...
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.
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.
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/APIOverview/OverviewoftheStoreKitAPI.html
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
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.
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.
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
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.
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.
Creating a canadian test user solve this issue.
Related
I'm seeing a very strange thing happening with my application.
To be specific, I am issuing a receipt request in order to download a receipt from Apple when I detect that the application does not contain a receipt file in its bundle.
Sure, calling the receipt refresh API causes the Apple ID login screen to be shown.
I have created "test"/"sandbox" users in iTunes Connect in order to test my application.
When running the application on my device (iPad with WiFi), the app successfully calls the refresh receipt function and then sure enough, the Apple ID login screen pops up. I enter the correct credentials of the test/sandbox user configured in iTunes Connect and everything is fine (i.e., the receipt is downloaded successfully.)
However, if I attempt to use a real Apple ID user, I get "didFailWithError" and the localized error description is: "Cannot connect to iTunes Store", the error code being "16".
This is expected, in my opinion.
Now, the sad part is that when I have submitted my build to Apple Review, they are getting the exact error mentioned above.
They are saying that they are using a sandbox user and thus they have rejected the application as they were unable to continue.
Note: They too have used an iPad with WiFi for testing the application.
I have consistently been able to reproduce this problem only when using real Apple ID user accounts and have never had a problem with sandbox users!
I've read somewhere that one would have to also make sure that the sandbox user is logged out of the "Settings" screen when testing. I've politely asked Apple Review to make sure that they would not be logged into "Settings" when testing.
They have sent me two screenshots: One with the Apple ID login screen that asks for BOTH the Apple ID user and the password (which causes me to think that they indeed were logged out of the "Settings" screen, otherwise they'd already have the Apple ID user pre-populated in the dialog) and one showing the error mentioned in this post.
I have no idea how to proceed now because I simply cannot reproduce this problem. It works perfectly with any sandbox users on my device -- it just doesn't work with real Apple ID users.
Apple Review sent me a screenshot showing the error mentioned in this post, again, an error that I can only reproduce when using a real Apple ID user in what is really a sandbox environment.
I think the only difference may be the fact that my device is running iOS 10.x while their device may be running iOS 12.x but I don't think it should be an issue.
Any thoughts ?
Thanks in advance!
P.S., they are not using an Apple ID sandbox user created by me -- they use their own. I have suggested to send them my sandbox users to test, but they said they could not accept as it would be a breach of privacy.
UPDATE: I have confirmed that the same thing happens on iOS 12.1 so it's not due to an OS difference.
It looks like at least in my case, there seems to be a problem with the refresh receipt API itself.
I have confirmed that initiating a purchase request causes the app to download a receipt from Apple with the credentials of the supplied user (sandbox user in our case.)
The review team has confirmed that the purchase request works correctly with their sandbox user, however, the refresh receipt DOES NOT work with that exact same user (it causes a code 16, "Cannot connect to iTunes Store")!
I have also confirmed that a "Restore" request causes the receipt to be downloaded and that it works with the supplied sandbox user.
In conclusion, both "Purchase" and "Request" operations causes the app to download a receipt from Apple and they work correctly for the sandbox user supplied by the Review Team. However, with the exact same user, the receipt refresh request fails!
I can still ask for a receipt refresh because it should work correctly for actual App Store downloads but it clearly did not work for app review.
I have implemented In App Purchase in so many applications and tested all of them in Sandbox environment. Right now I am working on one of the app's In App Purchase, which i tested yesterday and was working fine, but by today morning none of the existing sandbox accounts working for In App test.
I followed one of the apple thread to solve issue but nothing seems to be working.In this thread so many developers faced same issue, some of them come with solution, but none of them works for me.
I have tried below solutions till now:
Add new product with all meta data and tried with new product Id.
Created fresh demo app to test In App Purchase with new certificates and profiles.But not working.
Created new sandbox tester, verify it from mail account.
I am able to fetch product info like Product name and price but not able to complete purchase. At first when OS ask to enter Apple ID and Password for Sandbox user I entered it, it accept credential and iTunes logged in with sandbox user.But then suddenly another OS alert prompt with Invalid Address.
Find below screen shot of that alert.
When I tapped Continue, then it redirects to iTunes Store and after some loading, it display another alert with iTunes account creation not allowed. Below screen for that alert.
I have tried all possible solution but nothing worked for me. If any of you ever faced same problem then please update here.
I tried sandbox account with App Store Territory as United States and United Kingdom and it works, but with Indian Accounts not working.
Follow below steps to create Sandbox Account:
Open itunesconnect.apple.com
Select Users and Roles
Select Sandbox Testers
Select + button
From App Store Territory , you can create Sandbox Account for any country and test In App Purchase
Select country as United States or United Kingdom, works for me.
The "technerd" solution works properly in current situations, by using territory as "United States"
In case of Indian account, we need to follow the following extra steps.
1) After signin to iTunes Store message, we will get error in case of Indian Account.
"This apple ID is only valid for purchases in the U.S. iTunes Store. You will be switched to that Store." Touch OK
2) This will take us to iTunes store link, and come back to same view.
3) Sign - in again.
4) Success message will appear as
"You're currently subscribed to this. ..."
Hope this helps to persons like me.
Apple server looks like inappropriate, Wait for some time & try again.
Please logout with your sandbox account from your phone.Then make another account with App Store territory as United States, not as India.
I am sure it will works.
I am facing same problem ,as soon as i change Country ,it works like a charm.
I created a test user for the irish store
Signed out of my personal account
Launched the application and tried to make the purchase
I get the "Apple ID Verification" prompt
Asks me to set a new password
Please help
I was having the same issue (Australian App Store) and today things seem to have gone back to normal, but the behaviour is slightly different from before.
This has now worked for me:
- Created a new Sandbox user on iTunes Connect.
- Followed the link in the email sent to verify the email address.
- In the app, when interacting with StoreKit, the app will then ask for the App Store credentials. Enter the username and password.
- The "Apple ID Verification" alert will pop up. Tap "Settings".
- Change the password as instructed.
- In the app, repeat the operation that interacts with StoreKit. This should now work correctly.
Now is working fine...after friday 13 jan the same process works as expected. It's enough to verify the email and the sandbox allows you to try IAP! Should be only an Apple bug on their servers.
You need to setup Test users in iTunes Connect portal which you can use to test In App purchase functionality with Sandbox environment. You can't test in-app purchase functionality in sandbox environment using actual Apple account.
https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html
I'm developing in-app purchase using this excellent tutorial:
http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial
and I'm getting an error "Cannot connect to itunes store" which it seems can be related to Apple's sandbox servers being down; apart from googling for tweets regarding sandbox status, is there any other way of confirming their status otherwise it's difficult (read ipossible) to debug.
Almost a year late, but I'm facing the same problem right now. As far as I know, the best way to test the status of the iTunes Sandbox environment is checking this url:
http://sandbox.itunes.apple.com
An Http/1.1 Service Unavailable means SSErrorHTTPStatusCodeKey=503 in your debugger output.
I'll answer this in case someone else also comes up against this. I have an app in the app store that was built using the tutorial mentioned in the question, and it performs flawlessly. Unfortunately, in my experience the reliability of the Apple Sandbox servers can be iffy, with no obvious place to check online aside from posting to the Apple forums and hoping for a corroborative reply.
As others have said on StackOverflow, the key is to make sure that:
You create at least one test user account at itunesconnect.apple.com
Make sure that there is NO credit card associated with the test account
DO NOT sign into iTunes on your test device with the test account. Instead, SIGN OUT of any iTunes Store account you are signed into. Then try purchasing an IAP. It will ask for your username and password - give it your test username(s).
I got the "Cannot connect to itunes store" error when using a tester sandbox account. The problem was I had signed in on my iPhone with that account and confirmed the email address associated with the test account.
I solved the problem by creating a new tester account under Users and Roles in Itunes Connect and never sign in on my device with the account.
The reason for the error in my case was that when I confirmed the email address, the account was registered as a production account in AppStore and it did not work as a sandbox account anymore.
So if you sign in on your device once, the account will be registered as a production account and even if you sign out again, that account won´t work in the sandbox.
For testing an app in Sand Box . Follow these steps
To test IAP ,we have to create a test user at itunesconnect.apple.com
Go to Settings and sign out from all active accounts (mail, iTunes & App Store , Game Center)
Restart your device.
Run your app on the device. Click on the IAP button -> choose existing account -> enter apple id and password created from step 1. Now everything will be fine.
This question already has answers here:
Why In-App purchase sandbox always ask "Verification Required"?
(11 answers)
Closed 9 years ago.
I cant test my in-app purchases because I am always getting this error message: Verification Required: before you can make purchases, you must verify your payment info [Environment: Sandbox]. Two buttons are presented in UIAlertView: cancel and continue. If I tap continue I am redirected to Safari and I follow verification steps, but in my app in this case I always get "Cancelled transaction" event.
I am using the test accounts created in iTunes Connect. I tried creating several accounts but always the same message occurs. What to do?
Any hints?
From my experience I see two possibilities:
you didn't sign-out from the App Store in settings, so the system thinks you're trying to access using your "real" iTunes credentials
or you by mistake the test user for a real purchase (no sandbox or directly in the app store); in such case this user has been messed up and the only option for you is to create a new test user.
Both are quite common situations when the same device is used for development and private use.
You can also try to check-out the link listed in this famous page here:
http://troybrant.net/blog/2010/01/invalid-product-ids/
This problem was driving me crazy and took me half a day and quite a bit of research to solve it (thanks a lot Apple!), but I finally solved it and here is what worked for me:
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.
N.B. One user on the Apple Developers Forums who also managed to solve this issue claims you have to create at least 3 test accounts, as the first 2 won't work (https://devforums.apple.com/message/699718#699718).
I can't confirm that is true, but the test account with which I managed to successfully finish a transaction was indeed my third test account.
Hope this helps.
At the time of creating the Test user Account You would given Email ID. Apple send a mail to the Given mail ID for Verification.
What u have to do is, open that mail(inbox) and Click on the received mail from the Apple and click on the Verify Apple ID and Login into the Apple Account.
Now onwards you can login simply.
Thats all..,