Skip to content

Commit

Permalink
Merge pull request #276 from BaiMoHan/master
Browse files Browse the repository at this point in the history
feat(playstore): add VoidedPurchaseRefundType
  • Loading branch information
takecy authored May 13, 2024
2 parents 5b45c28 + ade758f commit 14fdbb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions playstore/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ const (
VoidedPurchaseProductTypeOneTime
)

type VoidedPurchaseRefundType int

const (
VoidedPurchaseRefundTypeFullRefund VoidedPurchaseRefundType = iota + 1
VoidedPurchaseRefundTypePartialRefund
)

// DeveloperNotification is sent by a Pub/Sub topic.
// Detailed description is following.
// https://developer.android.com/google/play/billing/rtdn-reference#json_specification
Expand Down Expand Up @@ -83,10 +90,12 @@ type OneTimeProductNotification struct {
// VoidedPurchaseNotification has token, order and product type to locate the right purchase and order.
// To learn how to get additional information about the voided purchase, check out the Google Play Voided Purchases API,
// which is a pull model that provides additional data for voided purchases between a given timestamp.
// https://developer.android.com/google/play/billing/rtdn-reference#voided-purchase
type VoidedPurchaseNotification struct {
PurchaseToken string `json:"purchaseToken"`
OrderID string `json:"orderId"`
ProductType VoidedPurchaseProductType `json:"productType"`
RefundType VoidedPurchaseRefundType `json:"refundType"`
}

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

0 comments on commit 14fdbb2

Please sign in to comment.