Skip to content

Commit

Permalink
Update verifyReceipt usage in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bizz84 committed Jan 14, 2017
1 parent 422414b commit 4630392
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ let receiptString = receiptData.base64EncodedString(options: [])
### Verify Receipt

```swift
SwiftyStoreKit.verifyReceipt(password: "your-shared-secret") { result in
let appleValidator = AppleReceiptValidator(service: .production)
SwiftyStoreKit.verifyReceipt(using: appleValidator, password: "your-shared-secret") { result in
if case .error(let error) = result {
if case .noReceiptData = error {
self.refreshReceipt()
Expand All @@ -204,7 +205,8 @@ func refreshReceipt() {
### Verify Purchase

```swift
SwiftyStoreKit.verifyReceipt(password: "your-shared-secret") { result in
let appleValidator = AppleReceiptValidator(service: .production)
SwiftyStoreKit.verifyReceipt(using: appleValidator, password: "your-shared-secret") { result in
switch result {
case .success(let receipt):
// Verify the purchase of Consumable or NonConsumable
Expand All @@ -229,7 +231,8 @@ Note that for consumable products, the receipt will only include the information
### Verify Subscription

```swift
SwiftyStoreKit.verifyReceipt(password: "your-shared-secret") { result in
let appleValidator = AppleReceiptValidator(service: .production)
SwiftyStoreKit.verifyReceipt(using: appleValidator, password: "your-shared-secret") { result in
switch result {
case .success(let receipt):
// Verify the purchase of a Subscription
Expand Down

0 comments on commit 4630392

Please sign in to comment.