Skip to content

Commit

Permalink
Update README with v2 endpoint version for Get Transaction History
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderjordanbaker committed Jun 14, 2024
1 parent 5beaba4 commit b687771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ console.log(verifiedNotification)
### Receipt Usage

```typescript
import { AppStoreServerAPIClient, Environment, ReceiptUtility, Order, ProductType, HistoryResponse, TransactionHistoryRequest } from "@apple/app-store-server-library"
import { AppStoreServerAPIClient, Environment, GetTransactionHistoryVersion, ReceiptUtility, Order, ProductType, HistoryResponse, TransactionHistoryRequest } from "@apple/app-store-server-library"

const issuerId = "99b16628-15e4-4668-972b-eeff55eeff55"
const keyId = "ABCDEFGHIJ"
Expand All @@ -104,7 +104,7 @@ if (transactionId != null) {
let transactions: string[] = []
do {
const revisionToken = response !== null && response.revision !== null ? response.revision : null
response = await client.getTransactionHistory(transactionId, revisionToken, transactionHistoryRequest)
response = await client.getTransactionHistory(transactionId, revisionToken, transactionHistoryRequest, GetTransactionHistoryVersion.V2)
if (response.signedTransactions) {
transactions = transactions.concat(response.signedTransactions)
}
Expand Down

0 comments on commit b687771

Please sign in to comment.