使用SKPayment API处理订阅升级。

huangapple go评论82阅读模式
英文:

Using SKPayment API to deal with subscription upgrades

问题

I have subscriptions working in the app I am dealing with, but I want to add a second subscription and allow upgrading from the old one (A) to the new one (B). (Note: I have both subscriptions configured in the same category on the developer portal.)

当我尝试在沙盒中使用时,我看到有两个订阅,而A最终会消失,但用户看到的消息并没有具体说明升级。我在App Store上测试了另一个应用程序,当我升级时,我看到的消息以"Your upgrade will start now."开头。

因此,似乎需要一些不同的API调用或其他标志,以触发升级,而不是单独的购买。

要正确支持订阅升级,我需要做什么?

更新:以下是另一个应用程序的截图,显示了我所说的文本。使用SKPayment API处理订阅升级。

更新2:可能这个问题的消息只在应用程序实际在App Store上时显示出来,但在我确定它可以正常工作之前,我不想真正发布它。所以如果有人可以告诉我在沙盒中是否也应该显示"Your upgrade will start now."消息,那将非常有帮助。

英文:

I have subscriptions working in the app I am dealing with, but I want to add a second subscription and allow upgrading from the old one (A) to the new one (B). (Note: I have both subscriptions configured in the same category on the developer portal.)

When someone purchases B (after already having purchased A), I am calling the same API:

	let payment = SKPayment(product: product)
	SKPaymentQueue.default().add(payment)

When I try this in the sandbox I see there are two subscriptions and A will eventually go away, but the message the user sees doesn't say anything specific about upgrade. I tested with another app on the App Store, and when I upgrade I see a message beginning with "Your upgrade will start now."

So it seems there is some different API call required, or some other flag, in order to trigger the upgrade instead of a separate purchase.

What do I need to do to properly support subscription upgrades?

Update: here is a screenshot from another app that shows the text I am talking about.使用SKPayment API处理订阅升级。

Update 2: It is possible that the message in question only shows up when the app is actually in the App Store, but I don't want to actually release this until I know it is working. So if someone can also let me know if "Your upgrade will start now." message is supposed to show up for sandbox as well, that would be helpful.

答案1

得分: 0

正确的消息是在应用程序上线时显示的,当进行实际购买时,会显示正确的消息。因此,不需要进行特殊的API调用,只是沙盒模式存在错误或问题。

英文:

When the app went live the correct message was shown when doing actual purchases. So no special API calls are required, it was just that there are bugs or quirks with the Sandbox mode.

huangapple
  • 本文由 发表于 2023年5月17日 06:28:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76267461.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定