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.
Related
Basically I was trying to purchase subscription with developer mode certificates using Sandbox account details. Up to now I have used around 100 times same Sandbox user details and it was worked perfectly.
But from last 2 to 3 days its not get able to success in making purchase. At the end of purchase, I was getting following kind of dialog box then after no success in purchase.
Still application was not live in market so I can't use real apple account for making purchase so I was using sandbox user details for testing purpose.
Subscription as well normal product purchase also not working with same reason.
So what is running wrong in this? Please share some idea regarding this.
For this I found ad hoc solution at present.
I belong to India and up to now I used India country sandbox user account for testing purpose but from last few days its completely stopped working.
So I have created US sandbox user account and within Settings of iPhone, I selected US as country as Apple Store also selected as US user.
Then after I can able to test with sandbox user but still Indian user sandbox account not working so not sure what is going wrong into that but temporary solution I have so adjusted with that.
I developing an App for Ukrainian people with In-App-Purchase. When I add sandbox tester with Ukraine location and try purchase I am getting this alert .
If I use some other location, Russia for example - thats good. My App is for Ukrainian people and I am disturbed by this.
Does anybody know how to resolve this issue?
Apple is a US company and are therefore they are prohibited from carrying out business transactions with the Crimea region of the Ukraine as per executive order 13685 section 1 (a) (iii)
(iii) the exportation, reexportation, sale, or supply, directly or indirectly, from the United States, or by a United States person, wherever located, of any goods, services, or technology to the Crimea region of Ukraine;
I suspect that since you don't enter an address, just a store, when creating a sandbox user, they don't know which region you are in and they default to blocking the purchase. In production, a user has a registered address which lets Apple block purchases more selectively.
It looks like you will need to complete your testing with a user from another store.
Note: iOS 12+ Only
Sign in into your main account. Then you will see option for SANDBOX ACCOUNT.
Use not Ukrainian test account and test your purchases.
Sandbox Account Image:
You need to create the sandbox tester, related to not Ukrainian Itunes Store. Something like this:
Many thanks to Mike form Cherrypie Studio
I had the same error that was caused by using test user with Ukrainian country. But that error didn't go away even after I logged out from that account, created new non Ukrainian one, logged in(many times), logged out (many times), deleted an app, restarted the phone...
The only thing that helped was device reset. Only after that system stopped showing me that error and I finally saw App Store login window again.
I am debugging my in-app purchase on ipad ( ios 7.0.3).
But when I enter my password, it always says "the apple id you entered couldn't be found or your password was incorrect".
my developer id and the apple id registered on this ipad are different.
when I intentionally enter wrong password, it displays a different message "Your Apple ID or password is incorrect".
My in-app purchase is in review state. But I feel, it doesn't have any impact on sandbox testing
I have restarted my device. I can use the same password for downloading/purchasing other apps from itunes.
I am not posting my in-app purchase code as this is out of our coding context.
In order to test in-app purchases before they are approved, you have to use test users, which you can create in iTunes Connect.
Once you sign in to iTunes Connect, you click where it says "Manage Users", which will let you create test users. Once you create a test user, you can use it within your development build of your app to test your in-app purchases. You can also create multiple test users if you need to repeatedly test non-consumable in-app purchases.
we have had same issue, spent whole day chasing rabbit at the end what solved issue was to set test account App Store Territory/country United states, in our case we have set country Pakistan on test account user causing issue
We also recently experienced this issue.
We "solved" it by using shorter email addresses for test users.
Emails longer than about 25 characters seemed to cause the error.
I want to test IAP, however it seems this isn't going to be possible without going through multiple hoops on iTunes Connect and entering bank information etc.
Reasons for SKProductsRequest returning 0 products?
Can anybody confirm if this is the case or not? If so then is there any reason why I can't just create a dummy test app entry in iTunes connect, enter garbage for the bank info, then after finishing testing delete the app entry from iTunes connect?
Yes, you definitely do have to enter banking and US tax info before you can do in-app purchases. I was getting "invalid product ID", but it started working as soon as my banking/tax info was set up. This doesn't seem to be documented anywhere.
Did not work for me. If it works out for you, let me know.
I tested in-app payment this late December 2013 / early January.
Yes you can test IAP without entering bank info. what you need to do is
Create a test user in itunesconnect
Run your app on an actual device
Launch AppStore App on your iphone/ipad
logout and login with your test user id
Go to your app and try to make an in-app purchase
You should get a prompt saying something like "Charge $0.99 to Sandbox"
You won't be charged to your actual account.
This is all documented by Apple HERE
Expand tab that says To perform testing for In-App Purchase products
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.