应用程序内购买问题 - 我哪里出错了? iPhone
我正在尝试测试我的应用内购买(在沙箱中)并遇到以下问题:
- 应用程序成功检索可用产品并将其显示在表格中。
- 用户单击“购买”
- 要求用户输入用户名和密码(这是我的测试用户)。
- 屏幕上返回一条确认信息,表明交易成功。
问题是内容没有被下载,并且似乎没有调用以下方法:
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
for (SKPaymentTransaction *transaction in transactions)
{
switch (transaction.transactionState)
{
case SKPaymentTransactionStatePurchased:
[self completeTransaction:transaction];
break;
case SKPaymentTransactionStateFailed:
[self failedTransaction:transaction];
break;
case SKPaymentTransactionStateRestored:
[self restoreTransaction:transaction];
default:
break;
}
}
}
任何人都可以帮忙吗?
I am trying to test my in app purchase (in sandbox) and have the following problem :
- The app retrieves the available products successfully and displays them in a table.
- The user clicks on "Buy"
- The user is asked to enter user name and password (this is my test user).
- A confirmation comes back saying on screen that the transcation was succesful.
The problem is that the content is then not downloaded and that the following method doesn't seem to be called :
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
for (SKPaymentTransaction *transaction in transactions)
{
switch (transaction.transactionState)
{
case SKPaymentTransactionStatePurchased:
[self completeTransaction:transaction];
break;
case SKPaymentTransactionStateFailed:
[self failedTransaction:transaction];
break;
case SKPaymentTransactionStateRestored:
[self restoreTransaction:transaction];
default:
break;
}
}
}
Can anyone help ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查是否添加了事务观察器
其中mObserverObject是您实现updatedTransactions方法的类的对象。
Check whether you added transaction observer
Where mObserverObject is the object of class where you have implemented updatedTransactions method.