Skip to content

Commit

Permalink
add verify signature example into README
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhanm committed Mar 10, 2022
1 parent 30703dc commit 341a0ee
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# huawei-iap
![](https://img.shields.io/badge/golang-1.16+-blue.svg?style=flat)

> **_NOTE:_** Still in development.
huawei-iap verifies the purchase receipt via Huawei Store

Current API Documents:
Expand Down Expand Up @@ -30,4 +28,18 @@ func main() {

purchaseData, err := client.VerifySubscription(context.TODO(), req)
}
```

### Verify Signature
```go
import (
"fmt"
hms "github.com/gokhanm/huawei-iap"
)

func main() {
if err := hms.VerifySignature("receipt", "signature", "publicKey"); err != nil {
fmt.Printf("huawei verify signature error. error: %v", err)
}
}
```

0 comments on commit 341a0ee

Please sign in to comment.