-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pavel Tikhonenko
committed
Oct 16, 2021
1 parent
b0f1a88
commit 4bb3226
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
CHANGELOG | ||
========= | ||
|
||
Mercato 0.0.1 | ||
--------- | ||
|
||
* Listen for transaction updates. If your app has unfinished transactions, you receive them immediately after the app launches | ||
```swift | ||
Mercato.listenForTransactions(finishAutomatically: false) { transaction in | ||
//Deliver content to the user. | ||
|
||
//Finish transaction | ||
await transaction.finish() | ||
} | ||
``` | ||
|
||
* Fetch products for the given set of product's ids | ||
```swift | ||
do | ||
{ | ||
let productIds: Set<String> = ["com.test.product.1", "com.test.product.2", "com.test.product.3"] | ||
let products = try await Mercato.retrieveProducts(productIds: productIds) | ||
|
||
//Show products to the user | ||
}catch{ | ||
//Handle errors | ||
} | ||
``` | ||
|
||
* Purchase a product | ||
```swift | ||
try await Mercato.purchase(product: product, quantity: 1, finishAutomatically: false, appAccountToken: nil, simulatesAskToBuyInSandbox: false) | ||
``` | ||
|
||
* Offering in-app refunds | ||
|
||
```swift | ||
try await Mercato.beginRefundProcess(for: product, in: windowScene) | ||
``` | ||
|
||
* Restore completed transactions | ||
|
||
```swift | ||
try await Mercato.restorePurchases() | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- [ ] Create example project based on Apple one | ||
- [ ] Get active subscription products | ||
- [ ] Download hosted content before finish transaction | ||
- [ ] Check whether product has an active subscription | ||
- [ ] Check whether product is refunded | ||
- [ ] Access unfinished transactions | ||
|