IOS internal purchase detailed explanation

Introduction

A recently developed APP has been rejected, for the following reasons:

The APP on the shelf is a training class, where the gold video course needs to be purchased, the Android side uses Alipay, and WeChat pays.

Apple regulations

Digital content, App features, services, etc., need to use in-app purchase

Real-world services (such as a club membership) or items (food, clothing, etc.) can not be used for in-app purchase, you can use Apple pay, WeChat payment, etc.

In a few words, explain the white IOS purchase:

1. The purchased goods are virtual

2. This virtual item should be published to the Apple server.

3, ios app payment, choose to publish products to the Apple server, payment, complete the transaction, Apple received 30%.

Development method

IOS in-app purchase payment two modes: Built-in mode

Server mode

The process of the built-in mode:

App gets product information from the app store

The user selects the product that needs to be purchased

App sends a payment request to the app store

The app store processes the payment request and returns the transaction information

The app presents the purchased content to the user

Server mode process:

App gets a list of product IDs from the server

App gets product information from the app store

The user selects the product that needs to be purchased

App send payment request to app store

The app store processes the payment request and returns the transaction information.

App sends the transaction receipt to the server

After the server receives the receipt, it sends it to app stroe to verify the validity of the receipt.

App store returns the verification result of the receipt

According to the results returned by the app store, whether the user purchases successfully

The differences between the above two modes are mainly:

The receipt of the transaction is verified, the built-in mode does not specifically verify the transaction receipt, and the server model uses a separate server to verify the transaction receipt. The built-in mode is quick and easy, but it is easy to crack. The server mode process is relatively complex, but relatively secure.

Specific development reference to the following article: