app server in firebase cloud functions.
TestFlight internal tester to purchase and forward the receipt to sandbox - 21003(not sure why not 0...)
when verify with production(buy) : result is 21007 (this is expected) The encoded receipt attached. The code of loading and base64 encoding is below : My Question: I expect to get 21007 from buy and got it, I expect to get 0 from Sandbox but end up with 21003. How can I fix this?
do{
let receiptData = try Data(contentsOf: appStoreReciptUrl,options: .alwaysMapped)
if let filename = getFileName(basename: "receipt"){
await writeToFile(data: receiptData,fileName: filename)
}
return receiptData.base64EncodedString(options: [])
}catch{