File tree 1 file changed +23
-2
lines changed
1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -178,9 +178,8 @@ func main() {
178
178
Sandbox: false ,
179
179
}
180
180
tokenStr := " SignedRenewalInfo Encode String" // or SignedTransactionInfo string
181
- token := jwt.Token {}
182
181
a := appstore.NewStoreClient (c)
183
- err := a.ParseNotificationV2 (tokenStr, &token )
182
+ token , err := a.ParseNotificationV2 (tokenStr)
184
183
185
184
claims , ok := token.Claims .(jwt.MapClaims )
186
185
for key , val := range claims {
@@ -189,6 +188,28 @@ func main() {
189
188
}
190
189
```
191
190
191
+ ``` go
192
+ import (
193
+ " github.com/richzw/appstore"
194
+ " github.com/golang-jwt/jwt/v4"
195
+ )
196
+
197
+ func main () {
198
+ c := &appstore.StoreConfig {
199
+ KeyContent: []byte (ACCOUNTPRIVATEKEY),
200
+ KeyID: " FAKEKEYID" ,
201
+ BundleID: " fake.bundle.id" ,
202
+ Issuer: " xxxxx-xx-xx-xx-xxxxxxxxxx" ,
203
+ Sandbox: false ,
204
+ }
205
+ tokenStr := " JWSTransactionDecodedPayload Encode String"
206
+ a := appstore.NewStoreClient (c)
207
+
208
+ jws , err := a.ParseNotificationV2WithClaim (tokenStr)
209
+ // access the fields of JWSTransactionDecodedPayload from jws directly
210
+ }
211
+ ```
212
+
192
213
# Support
193
214
194
215
App Store Server API [ 1.8] ( https://developer.apple.com/documentation/appstoreserverapi )
You can’t perform that action at this time.
0 commit comments