feat(iap/apple): 添加对appAccountToken的支持以关联订单
Build docker and publish / build (20.15.1) (push) Successful in 6m18s

解析JWS中的appAccountToken字段并添加到TransactionPayload结构体
在恢复逻辑中尝试使用appAccountToken关联现有订单
This commit is contained in:
2025-12-16 19:28:03 -08:00
parent 40a45199a5
commit d8f5628bb1
3 changed files with 20 additions and 0 deletions
+3
View File
@@ -71,6 +71,9 @@ func ParseTransactionJWS(jws string) (*TransactionPayload, error) {
t := time.UnixMilli(int64(v))
resp.RevocationDate = &t
}
if v, ok := raw["appAccountToken"].(string); ok {
resp.AppAccountToken = v
}
return &resp, nil
}
+1
View File
@@ -9,5 +9,6 @@ type TransactionPayload struct {
OriginalTransactionId string `json:"originalTransactionId"`
PurchaseDate time.Time `json:"purchaseDate"`
RevocationDate *time.Time`json:"revocationDate"`
AppAccountToken string `json:"appAccountToken"`
}