IOS-Precautions for using in-app payment, ios-Precautions
I. iOS development.
If the purchase is successful, we need to send the credential to the server for verification. In consideration of network exceptions, the sending credential operation on iOS should be persistent. If the program exits, crashes, or the network is abnormal, retry again.
2. server-side development.
The work on the server backend is relatively simple and consists of four steps:
1. Receive the purchase credential sent from iOS.
2. Check whether the credential exists and has been verified. Then, store the credential.
3. Send the credential to Apple's server for verification and return the verification result to the client.
4. If necessary, modify the user's membership permissions.
In consideration of network exceptions, the server verification should be a recoverable queue. If it fails, retry.
Reference: Tang Qiao, iOS development advanced.