feat: expose jwsRepresentation for server-side transaction verification#8
Merged
Conversation
…verification The server's Apple verify endpoint expects a JWS (JSON Web Signature) string (header.payload.signature format) but the binding only exposed TransactionId (a numeric ID), causing "Invalid JWS format. Expected 3 parts, got 1" errors. Changes: - Add `jwsRepresentation` property to PaymentTransaction (Swift + C# binding) - Pass VerificationResult.jwsRepresentation through all code paths: purchaseProduct, checkPurchaseStatus, collectCurrentEntitlements, findCurrentEntitlement, startTransactionListener - Rebuild StoreKit2Framework.framework binary with the new property - Bump version to 1.1.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ransaction 4 tests verify: - ObjC selector exists on PaymentTransaction class - JWS 3-part format vs numeric transactionId (the bug) - StoreKit 2 API chain correctness at compile time - ObjC runtime property inspection (readonly NSString) Includes StoreKit Testing configuration with VIP monthly subscription product. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- MAUI.StoreKit2.csproj: net8.0-ios → net10.0-ios (net8.0-ios is EOL) - CI workflow: dotnet-version 8.0.x → 10.0.x Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jwsRepresentationproperty toPaymentTransaction— the JWS (JSON Web Signature) string from StoreKit 2'sVerificationResult, required for server-side Apple transaction verificationVerificationResult.jwsRepresentationthrough all code paths:purchaseProduct,checkPurchaseStatus,collectCurrentEntitlements,findCurrentEntitlement,startTransactionListenerApiDefinitions.cs) to expose the new propertyStoreKit2Framework.frameworkbinaryBackground
The server's
/payment/api/v1/payment/apple/verifyendpoint expects a JWS token (format:header.payload.signature, 3 Base64URL-encoded parts separated by dots). Previously, onlyTransactionId(a numeric string like20000011428506923) was available in the C# binding, causing the server to return:With this change, consumers can use
paymentTransaction.JwsRepresentationto get the correct JWS string for server verification.Test plan
iphoneosandiphonesimulatorjwsRepresentationproperty confirmed in.swiftinterfaceand binary (stringscheck)/payment/api/v1/payment/apple/verify🤖 Generated with Claude Code