Skip to content

Commit 014eec3

Browse files
authored
Merge pull request #188 from inplayer-org/apple-v2-validate-docs
Added SDK docs for apple v2 validate method
2 parents 161ae0c + b154108 commit 014eec3

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

docs/guides/in-app-purchases/ios-in-app-purchases.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ To begin with, **the value of your offers** (= payment options) is vital in maki
4343
`<asset id>_<access fee id>`
4444

4545
According to this product/access fee correlation, by purchasing **one product** from a native ecosystem, the end-users are in fact purchasing **one price** from our system.
46-
As a merchant, you need to make sure that you have entered the **accurate value** as a product ID and then forward this information using the **validate method** of our native SDKs (illustrated below). This is crucial for having both the payment and access records entered in our system correctly, as well as for ensuring that your end-users will enjoy a cross-platform access on different devices for the purchased content.
46+
As a merchant, you need to make sure that you have entered the **accurate value** as a product ID. This is crucial for having both the payment and access records entered in our system correctly, as well as for ensuring that your end-users will enjoy a cross-platform access on different devices for the purchased content.
47+
To enable in-app payment, the application should communicate the payment information with the InPlayer system via the native SDK libraries.
4748

48-
**The validate method for iOS:**
49+
**The validate method for iOS for V1 notifications:**
50+
51+
The in-app payment process ends with a **receipt** generated by the native Apple system. Thus, via the **validate method for V1 notifications** in our SDK libraries, this payment receipt is to be forwarded to the InPlayer system, as well as the product ID.
4952

5053
```swift
5154
public static func validate(
@@ -56,9 +59,20 @@ public static func validate(
5659
)
5760
```
5861

59-
To enable in-app payment, the application should communicate the payment information with the InPlayer system via the native SDK libraries. More specifically, the in-app payment process ends with a **receipt** generated by the native Apple system. Thus, via the **validate method** in our SDK libraries, this payment receipt is to be forwarded to the InPlayer system.
62+
**The validate method for iOS for V2 notifications:**
63+
64+
The in-app payment process ends with a **transaction** generated by the native Apple system. Thus, via the **validate method for V2 notificiations** in our SDK libraries, only the transaction ID is to be forwarded to the InPlayer system.
65+
66+
```swift
67+
public static func validate(
68+
transactionIdentifier: String,
69+
success: @escaping ()-> Void,
70+
failure: @escaping (_ error: InPlayerError) -> Void
71+
)
72+
```
73+
6074

61-
Once our system receives this payment information, as a protection measure, it engages into validating that the receipt is both existing and valid in the native ecosystem (the communication with the native ecosystem is done via the parameters entered during the initial integration process). After the validity of the receipt is confirmed, our system will create and store all the relevant information regarding the in-app payment.
75+
Once our system receives this payment information, as a protection measure, it engages into validating that the receipt/transaction is both existing and valid in the native ecosystem (the communication with the native ecosystem is done via the parameters entered during the initial integration process). After the validity of the receipt/transaction is confirmed, our system will create and store all the relevant information regarding the in-app payment.
6276

6377
More precisely information for:
6478

0 commit comments

Comments
 (0)