In App Purchase is not allowed - ios

My app is in development phase I tried in app purchase in sandbox mode. But form last few days if I press purchase button it some time asked to insert my apple id password, but after that it says apple id not found. Though I can download apps with my apple id.
Sometimes it does not show ask for password, I debugged the code it always shows SKPaymentTransactionStateFailed this status.
Ii was working a few days ago.

You can not use an Apple ID to test IAP especially if your app is not live... You need to create a sandbox test user in iTunes Connect´s user and roles section and use these credentials to test IAP.
If your normal Apple iD is set in iTunes & App Store settings log out before testing IAP.

Related

iOS In app purchase sandbox user asking for verification

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

the apple id you entered couldn't be found or your password was incorrect

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.

Is it possible to test in-app-purchase without having to enter bank details etc?

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

Pop up while re-subscribing for product in sandbox environment

I am creating app in which user have to subscribe for product for 1 month/year. I was testing app in sandbox environment. For that i created test user account from itunes connect. I purchase product first time everything went ok. After 2-3 minutes I re-subscribe for same product I get alert with message "You’ve already purchased this in-app purchase but it hasn’t been downloaded". I try purchasing with different test account but got same message.
I want to ask weather this popup will reject my app from app store?
It pop's up if you try to buy a subscription while it's still active.
The user doesn't have to pay for that,so that's ok.
But you'd better not show that button,that allows user to buy a purchase,if he has already bought it)

iOS in-app purchases sandbox environment - verification required [duplicate]

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..,

Resources