Skip to content

Commit

Permalink
Merge pull request #149 from alexanderjordanbaker/V2GetTransactionHis…
Browse files Browse the repository at this point in the history
…toryREADME

Update README with v2 endpoint version for Get Transaction History
  • Loading branch information
alexanderjordanbaker authored Jun 16, 2024
2 parents 4a751a1 + b687771 commit 6049488
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 6049488

Please sign in to comment.