Skip to content

Commit 14fdbb2

Browse files
authored
Merge pull request #276 from BaiMoHan/master
feat(playstore): add VoidedPurchaseRefundType
2 parents 5b45c28 + ade758f commit 14fdbb2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

playstore/notification.go

+9
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ const (
3535
VoidedPurchaseProductTypeOneTime
3636
)
3737

38+
type VoidedPurchaseRefundType int
39+
40+
const (
41+
VoidedPurchaseRefundTypeFullRefund VoidedPurchaseRefundType = iota + 1
42+
VoidedPurchaseRefundTypePartialRefund
43+
)
44+
3845
// DeveloperNotification is sent by a Pub/Sub topic.
3946
// Detailed description is following.
4047
// https://developer.android.com/google/play/billing/rtdn-reference#json_specification
@@ -83,10 +90,12 @@ type OneTimeProductNotification struct {
8390
// VoidedPurchaseNotification has token, order and product type to locate the right purchase and order.
8491
// To learn how to get additional information about the voided purchase, check out the Google Play Voided Purchases API,
8592
// which is a pull model that provides additional data for voided purchases between a given timestamp.
93+
// https://developer.android.com/google/play/billing/rtdn-reference#voided-purchase
8694
type VoidedPurchaseNotification struct {
8795
PurchaseToken string `json:"purchaseToken"`
8896
OrderID string `json:"orderId"`
8997
ProductType VoidedPurchaseProductType `json:"productType"`
98+
RefundType VoidedPurchaseRefundType `json:"refundType"`
9099
}
91100

92101
// TestNotification is the test publish that are sent only through the Google Play Developer Console

0 commit comments

Comments
 (0)