当我使用真实产品测试我的应用时,我收到错误:
{FramesToPop:1,代码:“EUNSPECIFIED”}
我正在使用react-native with react-native-billing
我有以下代码:
async pay(productId) {
await InAppBilling.close();
try {
await InAppBilling.open();
if (!await InAppBilling.isPurchased(productId)) {
const details = await InAppBilling.purchase(productId);
}
const transactionStatus = await InAppBilling.getPurchaseTransactionDetails(productId);
const productDetails = await InAppBilling.getProductDetails(productId);
this.setState({payment : productDetails})
} catch (err) {
this.setState({error : 'Der skete en fejl - prøv venligst igen'})
} finally {
await InAppBilling.consumePurchase(productId);
await InAppBilling.close();
if (this.props.file.type == "video") {
this.uploadFile()
}
else if (this.props.file.type == "letter") {
this.saveLetter()
}
else {
this.sendTestament()
}
}
}
如果我再次运行付费功能,它就会成功。
我该如何解决这个问题?
午