Hello, Apple Developer Forum team. My team wishes you happy New Year and late Merry Christmas! We wish you a pay raise and a lot of days off! :)
Right now, my company works on a new program called MyQuickMac for macOS, which we plan to submit to App Store. Currently, my developer team is working on adding the in-app purchases to our product. While working on it, they encountered several issues, and this is exactly why I'm writing to you. Below, my team describes exactly which error did they encounter, and what did they try to resolve it. Please help us resolve these problems, it's very important for us.
Our current product is built using Electron and Python as a server (Flask). We use the "InAppPurchases" module from Electron to add the in-app purchases (https://www.electronjs.org/docs/latest/tutorial/in-app-purchases). Currently, we use the Sandbox to test our system, and we encountered the following problem when we try to purchase any product:
Purchasing mqm_1y2m...
{
transactionIdentifier: '',
transactionDate: '',
originalTransactionIdentifier: '',
transactionState: 'failed',
errorCode: 0,
errorMessage: 'MZFinance.NoAccount_message',
payment: { productIdentifier: 'mqm_1y2m', quantity: 1 }
}
{ productIdentifier: 'mqm_1y2m', quantity: 1 }
Failed to purchase mqm_1y2m.
This error occurs when we click on the "Buy" button, after our program submits the payment to the payments queue. The payment is successfully added to the payment queue, but after we log in with our testing account, this error occurs. We have read the documentation (https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox?language=objc), and it says that to test the in-app purchases, we need to try to buy the product, log in with the testing account, and after this testing account will be added to the App Store automatically, but it doesn't happen. What do we do wrong? We tried creating several testing accounts, but none of them worked.
Also, we can't sign out of the testing account after logging in. Currently, to do this we have to clear the App Store cache, remove all testing account-related items from the Keychain and reboot our device, which is a long process. We have read that to log out of the testing account, you need to select "Sign out" from the App Store, but because of the problem specified above, the App store doesn't have this option. Is this the correct way to sign out of the testing account? We hope that there should be some easy way to do it.
We tried to find some information about the error "MZFinance.NoAccount_message", but there were only 5 results, and none of them were helpful. We tried the following to resolve this error: created different testing accounts (we tried 3 accounts, none worked) changed the country of the testing accounts cleared the payment queue reset the password of the testing account tried different products tried to log in to the App Store and iCloud with the testing account restarted our device numerous times cleared the App Store cache deleted the entries left after trying some testing accounts in the Keychain signed the Electron ".app" with our certificate
None of these helped us, we get the same error every time.
Here's the link to the code we use to initialize the payments and observe the queue. Initialize payments: https://pastebin.com/S9KvsNGK Observe queue: https://pastebin.com/v1Gmqqz5
Also, we attach 2 log files that were recorded with the "Console" application, while trying to purchase a product. Log #1 (all messages): https://pastebin.com/jpuJaMqv Log #2 (only messages from "commerce" process): https://pastebin.com/w27qkyEB
So, our questions are:
- Why testing account isn't added to the App Store?
- Why does "MZFinance.NoAccount_message" error occur?
- How do we log out from the testing account?
We hope that the Apple Developer Forum team will help us resolve these issues.
Some information: Device: Mac Mini 2011 with macOS 10.12.6 Electron: 16.0.4 Python: 3.8.8
If you need any other information, please let us know, and we will send it to you as soon as possible. I hope that together, we will resolve these problems, and our new program will be successfully submitted to the App Store.
Thank you and have a nice day! Oleksii and team. Owner of American Best Technologies Company, LLC.