在应用内购买 - 可以获取产品信息,但无法连接到 iTunes 进行购买

发布于 2024-09-15 01:07:32 字数 483 浏览 3 评论 0 原文

我正在尝试让“应用程序内购买”在我的 iPhone 应用程序中运行。

我在 itunes connect 中创建了一些产品和一些测试帐户。

我可以毫无问题地检索产品数据(价格等..),但是当我尝试付款时 - 我被要求登录 - 我使用测试帐户 ->交易总是失败并出现以下错误:

failedTransaction with error:Error Domain=SKErrorDomain Code=2 "Connexion à l'iTunes Store isn't possible" UserInfo=0x65d02a0 {NSLocalizedDescription=Connexion à l'iTunes Store isn't possible}

我尝试了多种产品并进行了测试帐户(即使在像我们这样的其他商店),但我仍然遇到同样的错误...

注意:我认为我第一次尝试时效果很好,但从来没有仍然

欢迎任何想法!

谢谢

I'm trying to make "In App Purchase " works in my iphone app.

I created some products and a few test accounts in itunes connect.

I have no problem to retreive the products data (prices etc..) but when I try to make a payment
- I am asked to log in
- I use a test account
-> the transaction always fail with the following error :

failedTransaction with error : Error Domain=SKErrorDomain Code=2 "Connexion à l’iTunes Store impossible" UserInfo=0x65d02a0 {NSLocalizedDescription=Connexion à l’iTunes Store impossible}

I tried with several products and test account (even in other stores like us) but I still get the same error...

NB : I think it worked fine the first time I tried but never still

Any idea will be welcome !

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

星光不落少年眉 2024-09-22 01:07:32

对我来说,我只是仔细检查我的代码,直到发现我的错误。我确信一切都很好,但事实并非如此。当我向商店请求产品信息时,我使用了正确的产品标识符:

self.productRequest= [[[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject: @"com.popculturesoft.RC_vCar.fullVersion"]] autorelease];

但是,当我创建付款时,我使用了错误的产品标识符:

SKPayment *payment = [SKPayment paymentWithProductIdentifier:@"com.popculturesoft.RC_vCar_Lite.fullVerson"];

尽管使用产品标识符进行付款并不是正确的方法,但它可以让你做到这一点。最好使用 SKProduct 对象。 (我之前在代码中设置了 fullProduct 属性:

SKPayment *payment = [SKPayment paymentWithProduct:self.fullProduct]; 

我绝对确定商店已关闭,这就是问题所在。但第二天我决定从流程的开头开始,如 http://developer.apple.com/library/ios/#technotes/tn2259/_index .html,这是我发现问题所在的产品标识符。

For me, I just scoured my code until I found my mistake. I was so certain everything was fine, but it was not. When I requested product information from the store, I used the correct Product Identifier:

self.productRequest= [[[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject: @"com.popculturesoft.RC_vCar.fullVersion"]] autorelease];

However, when I went to create the payment, I used the incorrect Product Identifier:

SKPayment *payment = [SKPayment paymentWithProductIdentifier:@"com.popculturesoft.RC_vCar_Lite.fullVerson"];

Using the product Identifier for the payment is not the correct way to do it, although it allows you to do it. It is better to use an SKProduct object. (I had set the fullProduct property earlier in the code:

SKPayment *payment = [SKPayment paymentWithProduct:self.fullProduct]; 

I was absolutely certain that the store was down, and that was the problem. But the next day I decided to start from the beginning of the process, as described in http://developer.apple.com/library/ios/#technotes/tn2259/_index.html. This is when I found that my incorrect Product Identifier was the problem.

萌无敌 2024-09-22 01:07:32

查看此线程。看来是沙盒的问题。很多人都遇到这个问题

- iPhone storekit 沙盒停止工作

Check out this thread. It seems to be a problem with the Sandbox. Lot's of people having this issue-

iPhone storekit sandbox stopped working

夜血缘 2024-09-22 01:07:32

我也有同样的症状,就我而言,问题是我有一个与真实 Apple ID 帐户同名的测试用户帐户。我通过创建不同的测试用户帐户解决了该问题。

I had the same symptoms and in my case the problem was that I had a test user account with the same name as a real Apple ID account. I resolved the problem by creating a different test user account.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文