feat(iap/apple): 添加对appAccountToken的支持以关联订单
Build docker and publish / build (20.15.1) (push) Successful in 6m18s
Build docker and publish / build (20.15.1) (push) Successful in 6m18s
解析JWS中的appAccountToken字段并添加到TransactionPayload结构体 在恢复逻辑中尝试使用appAccountToken关联现有订单
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user