Skip to content

Commit

Permalink
Merge pull request #48 from Fidetro/readme
Browse files Browse the repository at this point in the history
update readme and delete semicolon
  • Loading branch information
alexanderjordanbaker committed Apr 27, 2024
2 parents 9d13ec2 + f278f68 commit f371464
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,13 @@ let issuerId = "99b16628-15e4-4668-972b-eeff55eeff55"
let keyId = "ABCDEFGHIJ"
let bundleId = "com.example"
let encodedKey = try! String(contentsOfFile: "/path/to/key/SubscriptionKey_ABCDEFGHIJ.p8")
let environment = Environment.SANDBOX
let environment = Environment.sandbox

// try! used for example purposes only
let client = try! AppStoreServerAPIClient(signingKey: encodedKey, keyId: keyId, issuerId: issuerId, bundleId: bundleId, environment: environment)

let appReceipt = "MI..."
let receiptUtil = ReceiptUtility()
let transactionIdOptional = receiptUtil.extractTransactionId(appReceipt: appReceipt)
let transactionIdOptional = ReceiptUtility.extractTransactionId(appReceipt: appReceipt)
if let transactionId = transactionIdOptional {
var transactionHistoryRequest = TransactionHistoryRequest()
transactionHistoryRequest.sort = TransactionHistoryRequest.Order.ascending
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class AppStoreServerAPIClient {
let response = await makeRequest(path: path, method: method, queryParameters: queryParameters, body: body)
switch response {
case .success(let data):
let decoder = getJsonDecoder();
let decoder = getJsonDecoder()
do {
let decodedBody = try decoder.decode(R.self, from: data)
return APIResult.success(response: decodedBody)
Expand Down

0 comments on commit f371464

Please sign in to comment.