Several questions about IAP

Source: Internet
Author: User

IAP is (In-app Purchase), in Apple Store. Let's take a look at its process:

And in the actual operation process, often encounter these two problems:

As long as the application play more people, basically will encounter such problems, the following is the result from the search engine:

This situation should be taken seriously, for the user is actually the money has been consumed, but the ingot or items are not obtained, this will be very anxious. Indeed, as a developer, the first response to this is that Apple has a problem, there is no problem with the process (logic), but in the steps Apple has taken, it may be abnormal, causing the problem. And we should actually have the corresponding solution, even if it is not "perfect", it is better than the second-hand one of the things do not do a lot more

"You have purchased this in-app purchase and this item will be restored for free. "The literal meaning is really not good to understand," bought "These three words, the personal inference is that the money has been deducted by Apple (click here to see an example >>). But there is no delivery, the order has been created and the money has been deducted, but it seems to have encountered an exception when closing the order. This anomaly, which I have tested before:

In the same wifi, using a different two devices, with the same sandbox account, the same app "simultaneous" purchase encountered this issue.

Note: "Simultaneous" –> means to click on a store to perform a purchase at almost the same time

The result is that device a buys the item m, which is not associated with device B before it is purchased, and can be purchased in most cases.

"Not yet downloaded" and "project will be free to restore" in fact something similar, why? Because the money has been deducted, or will not prompt "purchased."

While I test my application, it's logic is to receive the skpaymenttransactionstatepurchased status after the notification background issue, back to the client after a successful background shipment, the client then closed the order ([[Skpaymentqueue Defaultqueue] finishtransaction:transaction]; )。 Do not receive an apple response after closing the order, if this will cause a problem, the player money is deducted, but the corresponding item is always not posted, and also cannot be restored (because you call the finish, delete it from the purchase queue, the background Apple provides [[Skpaymentqueue Defaultqueue] restorecompletedtransactions]; to recover, but in practice it will be more complex).

And if the Apple callback and return to the skpaymenttransactionstatepurchased state, the client when passed to the background processing problem, and caused one to not call the Finishtransaction method to close the order, this does have a problem, But should not be the kind of hint, if there should also be the HTTP response content prompt. Do not call half a single, and then restart into the game, will go into the replenishment process, if the replenishment success is good, if it fails, then on the device will not be able to use the Apple ID to purchase the product (other products can be purchased), whether you uninstall the app and then delete or restart the device is not used. The only way is to close the order first.

If the Apple IAP has a timeout mechanism, the above-mentioned situation can explain the problem. This timeout may be the length of time the mobile client communicates with the Apple server, because the network is usually slow when encountering such problems, and the hint is never written by an application programmer (the statement reads Anti-human).

Despite all the talk, there is still no way to explain the causes and consequences of the problem, although there is still a need for a solution to avoid such problems. One of the options I thought of myself later was this:

Users encounter such problems will certainly find customer service feedback, customer service through it provides login server ID, role name, to find his login information, from the login information to find its device unique identification, such as IDFA, and then at the time of login to the device to return a special mark bit (only this login return), If the condition is met, perform a "manifest action", close all open orders, and allow the user to continue spending. As for the money that has been deducted by Apple, there are two options:

1, the user complained to Apple, refund to him;

2, the user to intercept the top-up record, and then research and development here to compare its top-up information to identify the order, it is a single operation;

Reference Links:

iOS Purchase (IAP) solution for the question "you have purchased this in-app purchase (in App. Purchase) project but not yet downloaded"

IAP has a problem prompting you have purchased this in-app purchase item but not yet downloaded

Several questions about IAP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.