ALL BUSINESS
COMIDA
DIRECTORIES
EDUCATIONAL
ENTERTAINMENT
FASHION TIPS
FINER THINGS
FREE CREATOR TOOLS
HEALTH
MARKETPLACE
MEMBER's ONLY
MONEY MATTER$
MOTIVATIONAL
NEWS & WEATHER
TECHNOLOGIA
TELEVISION NETWORKS
USA VOTES 2024
VIDEOS
INVESTOR RELATIONS
IN DEVELOPMENT
Posted by - Latinos MediaSyndication -
on - July 14, 2023 -
Filed in - Technology -
-
399 Views - 0 Comments - 0 Likes - 0 Reviews
I'm trying to send the unique transaction id to my server to verify the iOS purchase in flutter. I am using this package from npm https://www.npmjs.com/package/app-store-server-api. I also found this stack overflow question that is very similar to mine, but even though I'm using that code How to get a unique identifier for in app purchases in flutter which stays always the same I can't get my server to verify the transaction.
I already tried all the purchase codes that the in_app_purchases package provide but still get the error 4000006 on the server, am I missing something? do you know what the exact transaction id should be and where would I get it?
I already tried using all codes like this
purchaseID = purchaseDetails.purchaseID; if (purchaseDetails is AppStorePurchaseDetails) { final originalTransaction = purchaseDetails.skPaymentTransaction.originalTransaction; if (originalTransaction != null) { purchaseID = originalTransaction.transactionIdentifier; } }
upon reading the App Store Server notifications documentation I found something that says
"If the call succeeds, the original transaction identifier belongs to the sandbox environment. If the call fails with the same error code, the original transaction identifier isn’t present in either environment."
The error code in questions is 4000006 which is the one I'm always getting, and no further info is provided, what does this mean? and how does one solve this?
I tried login with a tester account I created on the app connect center, on a simulated device but after confirming the payment I get this error on the console
<SKPaymentQueue: 0x6000004e9650>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x60000091ab20 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=AMSErrorDomain Code=2 "Ocurri\U00f3 un error desconocido. Reintenta." UserInfo={NSLocalizedDescription=Ocurri\U00f3 un error desconocido. Reintenta.}", "Error Domain=com.apple.accounts Code=4 "No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox" UserInfo={NSLocalizedDescription=No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox}" ), NSLocalizedDescription=Authentication Failed, NSLocalizedFailureReason=The authentication failed.}}, storefront-country-code=USA, client-environment-type=Sandbox, AMSServerErrorCode=0, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}
isnt tester account supposed to be eligible for testing this type of features of the app? am I missing some setting?
keep in mind that my problem is not making the payment on the, on the device it goes trhu and using storekits override on xcode it also goes trhu, but the storekit transactionIds are 1, or 0, with the real device i get a transaction id like 2000000369143999 but the server always shows the transaction id is invalid
And this is how im using the ios endpoint
import { AppStoreServerAPI, Environment } from "app-store- server-api" import { IOS_PACKAGE_NAME } from "../controller/shared"; export const iosApi = new AppStoreServerAPI( KEY, KEY_ID, ISSUER_ID, APP_BUNDLE_ID, Environment.Sandbox )