Hi, I am testing a consumable in-app purchase on my app, with a Sandbox account on an iPad device.
The transaction was successful, as I saw "You're all set. Your purchase was successful. [Environment: Sandbox].
I set a break point in Xcode after the line await transaction.finish() in following code
private func handle(transactionVerification result: VerificationResult ) async {
switch result {
case let .verified(transaction):
guard
let product = self.products.first(where: {
$0.id == transaction.productID
})
else {
return
}
self.addPurchased(product)
await transaction.finish()
return. <----- breakpoint
And I saw those property values for the transaction
id UInt64 88*****848
originalID UInt64 437****2496
.
Then I use the originalID value 437*****2496 in a server library call in node.js
....
const environment = Environment.SANDBOX
....
const client = new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, environment)
....
const response = await client.getTransactionInfo("4379072496")
I got
apiError: 4040010, errorMessage: 'Transaction id not found.'
Could someone please tell me if I use the library call correctly with the right id? And why I got the error?
Thank you very much!
Kind regards,
Shih-Chin Yang
[Edited by Moderator]
7
0
1.5k