Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playstore): add VoidedPurchaseRefundType #276

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions playstore/notification.go
Original file line number Diff line number Diff line change
@@ -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
@@ -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
Loading