We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1ca35f3 + 2882435 commit 9c4044fCopy full SHA for 9c4044f
README.md
@@ -131,6 +131,26 @@ func main() {
131
}
132
```
133
134
+### Parse Notification from App Store
135
+
136
+```go
137
+import (
138
+ "github.com/awa/go-iap/appstore"
139
+ "github.com/golang-jwt/jwt/v4"
140
+)
141
142
+func main() {
143
+ tokenStr := "SignedRenewalInfo Encode String" // or SignedTransactionInfo string
144
+ token := jwt.Token{}
145
+ client := appstore.New()
146
+ err := client.ParseNotificationV2(tokenStr, &token)
147
148
+ claims, ok := token.Claims.(jwt.MapClaims)
149
+ for key, val := range claims {
150
+ fmt.Printf("Key: %v, value: %v\n", key, val) // key value of SignedRenewalInfo
151
+ }
152
+```
153
154
# ToDo
155
- [x] Validator for In App Purchase Receipt (AppStore)
156
- [x] Validator for Subscription token (GooglePlay)
0 commit comments