Skip to content

Commit c4aaa88

Browse files
authored
Merge pull request #194 from richzw/master
feat(hms): add more fields to hms notification
2 parents 66a389f + 67e55f5 commit c4aaa88

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

hms/notification.go

+12
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ type SubscriptionNotification struct {
1414
//
1515
// For details about how to obtain the public key, please refer to https://developer.huawei.com/consumer/en/doc/HMSCore-Guides-V5/query-payment-info-0000001050166299-V5
1616
NotifycationSignature string `json:"notifycationSignature"`
17+
18+
// Notification service version, which is set to v2.
19+
Version string `json:"version,omitempty"`
20+
21+
// Signature algorithm
22+
SignatureAlgorithm string `json:"signatureAlgorithm,omitempty"`
1723
}
1824

1925
// StatusUpdateNotification JSON content when unmarshal NotificationRequest.StatusUpdateNotification
@@ -30,6 +36,9 @@ type StatusUpdateNotification struct {
3036
// Subscription ID
3137
SubscriptionID string `json:"subscriptionId"`
3238

39+
// Subscription token, which matches a unique subscription ID.
40+
PurchaseToken string `json:"purchaseToken"`
41+
3342
// Timestamp, which is passed only when notificationType is CANCEL(1).
3443
CancellationDate int64 `json:"cancellationDate,omitempty"`
3544

@@ -65,6 +74,9 @@ type StatusUpdateNotification struct {
6574
// For details about how to obtain the public key, please refer to https://developer.huawei.com/consumer/en/doc/HMSCore-Guides-V5/query-payment-info-0000001050166299-V5
6675
LatestExpiredReceiptInfoSignature string `json:"latestExpiredReceiptInfoSignature,omitempty"`
6776

77+
// Signature algorithm
78+
SignatureAlgorithm string `json:"signatureAlgorithm,omitempty"`
79+
6880
// Renewal status. Value could be one of either:
6981
// 1: The subscription renewal is normal.
7082
// 0: The user has canceled subscription renewal.

0 commit comments

Comments
 (0)